about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-12-11 18:54:38 +0000
committerAlyssa Ross <hi@alyssa.is>2020-12-11 18:54:38 +0000
commitde4b220c1148320946882b920bb8d928f7d6c186 (patch)
tree0b1c67c64226326ad49572e85b6c5e87e1738f5f /nixpkgs/nixos/modules
parent746b8a3500254ef86e9dcf6f3ed3689c7468e304 (diff)
downloadnixlib-de4b220c1148320946882b920bb8d928f7d6c186.tar
nixlib-de4b220c1148320946882b920bb8d928f7d6c186.tar.gz
nixlib-de4b220c1148320946882b920bb8d928f7d6c186.tar.bz2
nixlib-de4b220c1148320946882b920bb8d928f7d6c186.tar.lz
nixlib-de4b220c1148320946882b920bb8d928f7d6c186.tar.xz
nixlib-de4b220c1148320946882b920bb8d928f7d6c186.tar.zst
nixlib-de4b220c1148320946882b920bb8d928f7d6c186.zip
nixos/mailman: add mailman group
Extracted from
b478e0043c53964c99cc9a145c155a673af3c7d8 ("nixos/mailman: refactor"),
to bring myself closer to current upstream.
Diffstat (limited to 'nixpkgs/nixos/modules')
-rw-r--r--nixpkgs/nixos/modules/services/mail/mailman.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/nixpkgs/nixos/modules/services/mail/mailman.nix b/nixpkgs/nixos/modules/services/mail/mailman.nix
index b10f9a22e17e..1b8ba29aed31 100644
--- a/nixpkgs/nixos/modules/services/mail/mailman.nix
+++ b/nixpkgs/nixos/modules/services/mail/mailman.nix
@@ -186,7 +186,12 @@ in {
       (requirePostfixHash [ "config" "local_recipient_maps" ] "postfix_lmtp")
     ];
 
-    users.users.mailman = { description = "GNU Mailman"; isSystemUser = true; };
+    users.users.mailman = {
+      description = "GNU Mailman";
+      isSystemUser = true;
+      group = "mailman";
+    };
+    users.groups.mailman = {};
 
     environment.etc."mailman3/mailman.cfg".text = mailmanCfg;
 
@@ -227,6 +232,7 @@ in {
           ExecStart = "${cfg.package}/bin/mailman start";
           ExecStop = "${cfg.package}/bin/mailman stop";
           User = "mailman";
+          Group = "mailman";
           Type = "forking";
           RuntimeDirectory = "mailman";
           LogsDirectory = "mailman";
@@ -295,6 +301,7 @@ in {
         '';
         serviceConfig = {
           User = cfg.webUser;
+          Group = "mailman";
           Type = "oneshot";
           # Similar to mailman-settings.service, this makes restartTriggers work
           # properly for this service.
@@ -310,6 +317,7 @@ in {
         serviceConfig = {
           ExecStart = "${cfg.package}/bin/mailman digests --send";
           User = "mailman";
+          Group = "mailman";
         };
       };
 
@@ -322,6 +330,7 @@ in {
         serviceConfig = {
           ExecStart = "${pkgs.mailman-web}/bin/mailman-web qcluster";
           User = cfg.webUser;
+          Group = "mailman";
           WorkingDirectory = "/var/lib/mailman-web";
         };
       };
@@ -334,6 +343,7 @@ in {
         serviceConfig = {
           ExecStart = "${pkgs.mailman-web}/bin/mailman-web runjobs minutely";
           User = cfg.webUser;
+          Group = "mailman";
           WorkingDirectory = "/var/lib/mailman-web";
         };
       };
@@ -346,6 +356,7 @@ in {
         serviceConfig = {
           ExecStart = "${pkgs.mailman-web}/bin/mailman-web runjobs quarter_hourly";
           User = cfg.webUser;
+          Group = "mailman";
           WorkingDirectory = "/var/lib/mailman-web";
         };
       };
@@ -358,6 +369,7 @@ in {
         serviceConfig = {
           ExecStart = "${pkgs.mailman-web}/bin/mailman-web runjobs hourly";
           User = cfg.webUser;
+          Group = "mailman";
           WorkingDirectory = "/var/lib/mailman-web";
         };
       };
@@ -370,6 +382,7 @@ in {
         serviceConfig = {
           ExecStart = "${pkgs.mailman-web}/bin/mailman-web runjobs daily";
           User = cfg.webUser;
+          Group = "mailman";
           WorkingDirectory = "/var/lib/mailman-web";
         };
       };
@@ -382,6 +395,7 @@ in {
         serviceConfig = {
           ExecStart = "${pkgs.mailman-web}/bin/mailman-web runjobs weekly";
           User = cfg.webUser;
+          Group = "mailman";
           WorkingDirectory = "/var/lib/mailman-web";
         };
       };
@@ -394,6 +408,7 @@ in {
         serviceConfig = {
           ExecStart = "${pkgs.mailman-web}/bin/mailman-web runjobs yearly";
           User = cfg.webUser;
+          Group = "mailman";
           WorkingDirectory = "/var/lib/mailman-web";
         };
       };