nixpkgs/nixos/modules
Jamey Sharp 597563d248 nixos/nscd: let systemd manage directories
Previously this module created both /var/db/nscd and /run/nscd using
shell commands in a preStart script. Note that both of these paths are
hard-coded in the nscd source. (Well, the latter is actually
/var/run/nscd but /var/run is a symlink to /run so it works out the
same.)

/var/db/nscd is only used if the nscd.conf "persistent" option is turned
on for one or more databases, which it is not in our default config
file. I'm not even sure persistent mode can work under systemd, since
`nscd --shutdown` is not synchronous so systemd will always
unceremoniously kill nscd without reliably giving it time to mark the
databases as unused. Nonetheless, if someone wants to use that option,
they can ensure the directory exists using systemd.tmpfiles.rules.

systemd can create /run/nscd for us with the RuntimeDirectory directive,
with the added benefit of causing systemd to delete the directory on
service stop or restart. The default value of RuntimeDirectoryMode is
755, the same as the mode which this module was using before.

I don't think the `rm -f /run/nscd/nscd.pid` was necessary after NixOS
switched to systemd and used its PIDFile directive, because systemd
deletes the specified file after the service stops, and because the file
can't persist across reboots since /run is a tmpfs. Even if the file
still exists when nscd starts, it's only a problem if the pid it
contains has been reused by another process, which is unlikely. Anyway,
this change makes that deletion even less necessary, because now systemd
deletes the entire /run/nscd directory when the service stops.
2019-07-03 12:39:48 -07:00
..
config networkmanager: Add rc-manager option 2019-07-03 09:40:05 +00:00
hardware Merge staging-next into staging 2019-06-18 11:07:56 +02:00
i18n/input-method
installer sd-image-raspberrypi: populateBoot -> populateFirmware 2019-06-25 20:49:34 -04:00
misc Merge pull request #62891 from jtojnar/nixos-documentation-nixos-help-use-w3m-1-by-default 2019-06-22 21:37:22 -04:00
profiles
programs nixos/captive-browser: fix module 2019-06-14 20:38:33 +02:00
security FIx some malformed XML in option descriptions 2019-05-13 09:15:17 +02:00
services nixos/nscd: let systemd manage directories 2019-07-03 12:39:48 -07:00
system Add configurationLimit to systemd-boot to prevent running out of disk space 2019-06-22 20:11:11 +02:00
tasks nixos/zfs: Remove requestEncryptionCredentials assertion 2019-06-21 03:33:09 +02:00
testing nixos/test: remove the stateVersion statement from the test-instrumentation 2019-06-03 15:05:24 +02:00
virtualisation Merge pull request #53204 from peterhoeg/m/libvirt 2019-06-27 11:39:48 +08:00
module-list.nix Merge pull request #63551 from Steell/roon-server 2019-07-02 10:06:29 +08:00
rename.nix Revert "Merge pull request #63156 from Izorkin/phpfpm-rootless" 2019-06-28 21:47:43 -04:00