about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd
diff options
context:
space:
mode:
authorSilvan Mosberger <infinisil@icloud.com>2019-07-31 23:19:49 +0200
committerSilvan Mosberger <infinisil@icloud.com>2019-10-14 01:59:19 +0200
commit23d920c8f0d8d790fc69e155acbe9342853cc46a (patch)
treee9a0ac4f220c54f201ec012a553db4c695400f70 /pkgs/os-specific/linux/systemd
parent6c8aed6391a5e9f69cb59792aed58c5f33650275 (diff)
downloadnixlib-23d920c8f0d8d790fc69e155acbe9342853cc46a.tar
nixlib-23d920c8f0d8d790fc69e155acbe9342853cc46a.tar.gz
nixlib-23d920c8f0d8d790fc69e155acbe9342853cc46a.tar.bz2
nixlib-23d920c8f0d8d790fc69e155acbe9342853cc46a.tar.lz
nixlib-23d920c8f0d8d790fc69e155acbe9342853cc46a.tar.xz
nixlib-23d920c8f0d8d790fc69e155acbe9342853cc46a.tar.zst
nixlib-23d920c8f0d8d790fc69e155acbe9342853cc46a.zip
nixos/users: Increase maximum system uid/gid from 499 to 999
This enlarges the system uid/gid range 6-fold, from 100 to 600 ids. This
is a preventative measure against running out of dynamically allocated
ids for NixOS services with isSystemUser, which should become the
preferred way of allocating uids for non-real users.
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index e4c05e361b48..367f9962f7ee 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -84,8 +84,18 @@ stdenv.mkDerivation {
     "-Dldconfig=false"
     "-Dsmack=true"
     "-Db_pie=true"
-    "-Dsystem-uid-max=499" #TODO: debug why awking around in /etc/login.defs doesn't work
-    "-Dsystem-gid-max=499"
+    /*
+    As of now, systemd doesn't allow runtime configuration of these values. So
+    the settings in /etc/login.defs have no effect on it. Many people think this
+    should be supported however, see
+    - https://github.com/systemd/systemd/issues/3855
+    - https://github.com/systemd/systemd/issues/4850
+    - https://github.com/systemd/systemd/issues/9769
+    - https://github.com/systemd/systemd/issues/9843
+    - https://github.com/systemd/systemd/issues/10184
+    */
+    "-Dsystem-uid-max=999"
+    "-Dsystem-gid-max=999"
     # "-Dtime-epoch=1"
 
     (if !stdenv.hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true")