the cgroups experimental feature does not work properly without this because we do not stop subdaemons when the main daemon is shut down. systemd needs the assigned cgroups to be empty to restart the daemon and thus cannot cleanly restart the daemon if any connections exist. starting a fresh unit for each connection creates a new cgroup every time instead of sharing any delegations and thus solves the problem. fixes #1030 Change-Id: Id6c458aad30eaa08c3609ac8280a7dde8e8f3cf9
16 lines
420 B
Plaintext
16 lines
420 B
Plaintext
[Unit]
|
|
Description=Nix Daemon instance
|
|
Documentation=man:nix-daemon https://docs.lix.systems/manual/lix/stable
|
|
CollectMode=inactive-or-failed
|
|
RequiresMountsFor=@storedir@
|
|
RequiresMountsFor=@localstatedir@
|
|
RequiresMountsFor=@localstatedir@/nix/db
|
|
|
|
[Service]
|
|
ExecStart=@@bindir@/nix-daemon nix-daemon --for-socket-activation
|
|
CacheDirectory=nix
|
|
LimitNOFILE=1048576
|
|
TasksMax=1048576
|
|
Delegate=yes
|
|
DelegateSubgroup=supervisor
|