diff options
author | Peter Simons <simons@cryp.to> | 2019-08-30 17:55:59 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2019-08-30 18:00:36 +0200 |
commit | 6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8 (patch) | |
tree | e184e713e6f694648d531c6ad45ed380e5b7208e | |
parent | da456aff25b1469eef756b6e0ce9c97401eaee1a (diff) | |
download | nixlib-6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8.tar nixlib-6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8.tar.gz nixlib-6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8.tar.bz2 nixlib-6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8.tar.lz nixlib-6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8.tar.xz nixlib-6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8.tar.zst nixlib-6b87772ca4a0b7d8448365b4f1c1a08a904fb3e8.zip |
nixos/mailman: don't reserve a static uid in the system
Any system uid will do, so we let the system allocate one for us. The 'mailman' group is gone entirely since we don't need it. Users who wish to run the 'mailman' administration utility can do so via 'sudo': $ sudo -u mailman mailman info Also, simplify the syntax of our user.users entry to rely on an attribute set rather than a list.
-rw-r--r-- | nixos/modules/misc/ids.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/mail/mailman.nix | 14 |
2 files changed, 4 insertions, 14 deletions
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index efd8544d6a21..ac6af1ce8b77 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -340,7 +340,7 @@ cockroachdb = 313; zoneminder = 314; paperless = 315; - mailman = 316; + #mailman = 316; # removed 2019-08-30 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! @@ -641,7 +641,7 @@ cockroachdb = 313; zoneminder = 314; paperless = 315; - mailman = 316; + #mailman = 316; # removed 2019-08-30 # When adding a gid, make sure it doesn't match an existing # uid. Users and groups with the same name should have equal diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix index cae59cb52cc0..f4d635139fa2 100644 --- a/nixos/modules/services/mail/mailman.nix +++ b/nixos/modules/services/mail/mailman.nix @@ -76,16 +76,7 @@ in { } ]; - users.users = singleton { - name = "mailman"; - group = "mailman"; - uid = config.ids.uids.mailman; - }; - - users.groups = singleton { - name = "mailman"; - gid = config.ids.gids.mailman; - }; + users.users.mailman = { description = "GNU Mailman"; isSystemUser = true; }; environment = { systemPackages = [ mailmanExe ]; @@ -105,10 +96,9 @@ in { ExecStart = "${mailmanExe}/bin/mailman start"; ExecStop = "${mailmanExe}/bin/mailman stop"; User = "mailman"; - Group = "mailman"; Type = "forking"; StateDirectory = "mailman"; - StateDirectoryMode = "0750"; + StateDirectoryMode = "0700"; RuntimeDirectory = "mailman"; PIDFile = "/run/mailman/master.pid"; }; |