nixos/nscd: document why it is configured this way
commitd79584c90253107d8d29869de0951545a567554a
authorJamey Sharp <jamey@minilop.net>
dateFri 12 Jul 2019, 12:07 (7 years ago)
parentf7c7767
nixos/modules/services/system/nscd.nix+6
@@ -52,6 +52,12 @@ in
5252 config.environment.etc."nscd.conf".source
5353 ];
5454
55+ # We use DynamicUser because in default configurations nscd doesn't
56+ # create any files that need to survive restarts. However, in some
57+ # configurations, nscd needs to be started as root; it will drop
58+ # privileges after all the NSS modules have read their configuration
59+ # files. So prefix the ExecStart command with "!" to prevent systemd
60+ # from dropping privileges early. See ExecStart in systemd.service(5).
5561 serviceConfig =
5662 { ExecStart = "!@${pkgs.glibc.bin}/sbin/nscd nscd";
5763 Type = "forking";