about summary refs log tree commit diff
path: root/nixos/modules/services/mail
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-01-06 06:50:18 +0000
committerRobin Gloster <mail@glob.in>2016-01-07 06:39:06 +0000
commit88292fdf09960e9cb8e3c063a6b95ac4284222ec (patch)
tree34ff267ed7bacf9fd906b1736476b431e9afe909 /nixos/modules/services/mail
parentaf50b03f50d88954e98018c7c18c0581928b7165 (diff)
downloadnixlib-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar
nixlib-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.gz
nixlib-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.bz2
nixlib-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.lz
nixlib-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.xz
nixlib-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.zst
nixlib-88292fdf09960e9cb8e3c063a6b95ac4284222ec.zip
jobs -> systemd.services
Diffstat (limited to 'nixos/modules/services/mail')
-rw-r--r--nixos/modules/services/mail/freepops.nix17
-rw-r--r--nixos/modules/services/mail/spamassassin.nix6
2 files changed, 11 insertions, 12 deletions
diff --git a/nixos/modules/services/mail/freepops.nix b/nixos/modules/services/mail/freepops.nix
index 2dd27a2033a7..e8c30a36923f 100644
--- a/nixos/modules/services/mail/freepops.nix
+++ b/nixos/modules/services/mail/freepops.nix
@@ -72,15 +72,16 @@ in
   };
 
   config = mkIf cfg.enable {
-    jobs.freepopsd = {
+    systemd.services.freepopsd = {
       description = "Freepopsd (webmail over POP3)";
-      startOn = "ip-up";
-      exec = ''${pkgs.freepops}/bin/freepopsd \
-        -p ${toString cfg.port} \
-        -t ${toString cfg.threads} \
-        -b ${cfg.bind} \
-        -vv -l ${cfg.logFile} \
-        -s ${cfg.suid.user}.${cfg.suid.group}
+      wantedBy = [ "ip-up.target" ];
+      script = ''
+        ${pkgs.freepops}/bin/freepopsd \
+          -p ${toString cfg.port} \
+          -t ${toString cfg.threads} \
+          -b ${cfg.bind} \
+          -vv -l ${cfg.logFile} \
+          -s ${cfg.suid.user}.${cfg.suid.group}
       '';
     };
   };
diff --git a/nixos/modules/services/mail/spamassassin.nix b/nixos/modules/services/mail/spamassassin.nix
index a3ac9e372422..08953134b3b3 100644
--- a/nixos/modules/services/mail/spamassassin.nix
+++ b/nixos/modules/services/mail/spamassassin.nix
@@ -50,15 +50,13 @@ in
       gid = config.ids.gids.spamd;
     };
 
-    jobs.spamd = {
+    systemd.services.spamd = {
       description = "Spam Assassin Server";
 
       wantedBy = [ "multi-user.target" ];
       after = [ "network.target" ];
 
-      exec = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --nouser-config --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/var/run/spamd.pid";
+      script = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --nouser-config --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/var/run/spamd.pid";
     };
-
   };
-
 }