diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index c1b55cb5550e..f5c0e02e47f1 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -213,6 +213,7 @@ ./services/networking/prayer.nix ./services/networking/privoxy.nix ./services/networking/quassel.nix + ./services/networking/radicale.nix ./services/networking/radvd.nix ./services/networking/rdnssd.nix ./services/networking/rpcbind.nix diff --git a/nixos/modules/services/networking/radicale.nix b/nixos/modules/services/networking/radicale.nix new file mode 100644 index 000000000000..fc9afc70aca4 --- /dev/null +++ b/nixos/modules/services/networking/radicale.nix @@ -0,0 +1,48 @@ +{config, lib, pkgs, ...}: + +with lib; + +let + + cfg = config.services.radicale; + + confFile = pkgs.writeText "radicale.conf" cfg.config; + +in + +{ + + options = { + + services.radicale.enable = mkOption { + type = types.bool; + default = false; + description = '' + Enable Radicale CalDAV and CardDAV server + ''; + }; + + services.radicale.config = mkOption { + type = types.string; + default = ""; + description = '' + Radicale configuration, this will set the service + configuration file + ''; + }; + }; + + config = mkIf cfg.enable { + + environment.systemPackages = [ pkgs.pythonPackages.radicale ]; + + jobs.radicale = { + description = "A Simple Calendar and Contact Server"; + startOn = "started network-interfaces"; + exec = "${pkgs.pythonPackages.radicale}/bin/radicale -C ${confFile} -d"; + daemonType = "fork"; + }; + + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04116d388837..05188f991476 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1155,7 +1155,7 @@ let gnuvd = callPackage ../tools/misc/gnuvd { }; goaccess = callPackage ../tools/misc/goaccess { }; - + googleAuthenticator = callPackage ../os-specific/linux/google-authenticator { }; gource = callPackage ../applications/version-management/gource {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 933a073a5aa3..006e05630b60 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2233,6 +2233,37 @@ rec { }; }; + radicale = buildPythonPackage rec { + name = "radicale-${version}"; + namePrefix = ""; + version = "0.9b1"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/R/Radicale/Radicale-${version}.tar.gz"; + sha256 = "3a8451909de849f173f577ddec0a085f19040dbb6aa13d5256208a0f8e11d88d"; + }; + + propagatedBuildInputs = with pythonPackages; [ + flup + ldap + sqlalchemy + ]; + + doCheck = false; + + meta = { + homepage = "http://www.radicale.org/"; + longDescription = '' + The Radicale Project is a complete CalDAV (calendar) and CardDAV + (contact) server solution. Calendars and address books are available for + both local and remote access, possibly limited through authentication + policies. They can be viewed and edited by calendar and contact clients + on mobile phones or computers. + ''; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = [ stdenv.lib.maintainers.edwtjo ]; + }; + }; raven = buildPythonPackage rec { name = "raven-3.4.1";