nix/misc
Florian Klink d60f3cf6e9 nix-daemon.conf.in: add tmpfiles file to create nix/daemon-socket directory
nix-daemon.socket is used to socket-activate nix-daemon.service when
/nix/var/nix/daemon-socket/socket is accessed.

In container usecases, sometimes /nix/var/nix/daemon-socket is
bind-mounted read-only into the container.

In these cases, we want to skip starting nix-daemon.socket.

However, since systemd 250, `ConditionPathIsReadWrite` is also not met
if /nix/var/nix/daemon-socket doesn't exist at all. This means, a
regular NixOS system will skip starting nix-daemon.socket:

> [  237.187747] systemd[1]: Nix Daemon Socket was skipped because of a failed condition check (ConditionPathIsReadWrite=/nix/var/nix/daemon-socket).

To prevent this from happening, ship a tmpfiles file that'll cause the
directory to be created if it doesn't exist already.

In the case of NixOS, we can just add Nix to `systemd.tmpfiles.packages`
and have these files picked up automatically.
2022-03-18 16:14:09 +01:00
..
bash completions: pipe stderr to /dev/null 2022-02-04 22:43:16 +01:00
fish Don't insert spaces when completing attribute paths 2021-12-22 16:17:01 +01:00
launchd launchd: Set NumberOfFiles to 4096 2021-12-04 20:46:29 +08:00
systemd nix-daemon.conf.in: add tmpfiles file to create nix/daemon-socket directory 2022-03-18 16:14:09 +01:00
systemv SystemV init file for BSD systems, old Linux distributions (RHEL 6) and Linux dist without systemd 2016-05-02 22:25:28 +02:00
upstart Apply OS checks to host platform, not build 2021-06-23 15:00:36 +00:00
zsh completions: pipe stderr to /dev/null 2022-02-04 22:43:16 +01:00