nixpkgs/nixos/modules/services
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
..
admin cleanup redundant text in modules utilizing mkEnableOption 2019-04-20 14:44:02 +02:00
amqp nixos/rabbitmq: replace deprecated usage of PermissionsStartOnly 2019-04-13 07:00:57 -04:00
audio Merge pull request #63551 from Steell/roon-server 2019-07-02 10:06:29 +08:00
backup duplicati: fix StateDirectory 2019-06-27 14:15:37 +02:00
cluster treewide: remove unused variables (#63177) 2019-06-16 19:59:05 +00:00
computing nixos/boinc: replace deprecated usage of PermissionsStartOnly 2019-05-26 07:20:56 -04:00
continuous-integration treewide: Remove usage of isNull 2019-04-29 14:05:50 +02:00
databases nixos/mysql: make ExecStartPost script fail on error 2019-07-03 08:50:21 +02:00
desktops nixos/deepin: add dde-control-center 2019-06-27 22:15:13 -04:00
development nixos/jupyter: wait for network.target 2018-11-06 20:40:20 +01:00
editors doc: Use prompt more often 2019-06-17 13:25:50 +02:00
games Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
hardware udev: be more verbose about the error 2019-06-21 18:05:14 +02:00
logging nixos/graylog: replace deprecated usage of PermissionsStartOnly 2019-05-26 07:20:57 -04:00
mail Revert "Merge pull request #63156 from Izorkin/phpfpm-rootless" 2019-06-28 21:47:43 -04:00
misc Revert "Merge pull request #63156 from Izorkin/phpfpm-rootless" 2019-06-28 21:47:43 -04:00
monitoring Merge pull request #62061 from aanderse/nagios 2019-07-03 06:19:35 -04:00
network-filesystems nixos/doc: Fix spurious indentation 2019-06-17 12:28:26 +02:00
networking networkmanager: Documentation cleanup. 2019-07-03 09:40:05 +00:00
printing Merge pull request #59076 from Yarny0/cups-path-fix 2019-05-30 10:52:28 -04:00
scheduling Merge pull request #51918 from bobvanderlinden/var-run 2019-04-07 20:09:46 +02:00
search treewide: Remove usage of isNull 2019-04-29 14:05:50 +02:00
security nixos: add StateDirectory for fprintd 2019-05-26 18:06:46 +01:00
system nixos/nscd: let systemd manage directories 2019-07-03 12:39:48 -07:00
torrent nixos/deluge: add authFile, config & port options 2019-06-04 18:08:11 +02:00
ttys nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
web-apps Revert "Merge pull request #63156 from Izorkin/phpfpm-rootless" 2019-06-28 21:47:43 -04:00
web-servers Revert "Merge pull request #63156 from Izorkin/phpfpm-rootless" 2019-06-28 21:47:43 -04:00
x11 Merge pull request #62852 from samueldr/fix/xterm-desktop-manager-default 2019-06-24 14:48:58 -04:00