diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-07T09·18+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-07T09·50+0200 |
commit | 84d6936371037559704337614c65007a8e61b5e1 (patch) | |
tree | eb21a77502e0c67d525128e74212606e11ce0ea5 /misc/systemd | |
parent | 8e5fbf4d730b9fcf39eddf5539a206cf19d2cdce (diff) |
Install systemd units
Diffstat (limited to 'misc/systemd')
-rw-r--r-- | misc/systemd/local.mk | 1 | ||||
-rw-r--r-- | misc/systemd/nix-daemon.service | 10 | ||||
-rw-r--r-- | misc/systemd/nix-daemon.service.in | 9 | ||||
-rw-r--r-- | misc/systemd/nix-daemon.socket.in | 11 |
4 files changed, 21 insertions, 10 deletions
diff --git a/misc/systemd/local.mk b/misc/systemd/local.mk new file mode 100644 index 000000000000..a5f6131ce878 --- /dev/null +++ b/misc/systemd/local.mk @@ -0,0 +1 @@ +$(foreach n, nix-daemon.socket nix-daemon.service, $(eval $(call install-file-in, $(d)/$(n), $(libdir)/systemd/system, 0644))) diff --git a/misc/systemd/nix-daemon.service b/misc/systemd/nix-daemon.service deleted file mode 100644 index ee28209f090e..000000000000 --- a/misc/systemd/nix-daemon.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Helper daemon for managing secure, multi-user Nix stores -After=syslog.target - -[Service] -Type=simple -ExecStart=/usr/bin/nix-daemon - -[Install] -WantedBy=multi-user.target diff --git a/misc/systemd/nix-daemon.service.in b/misc/systemd/nix-daemon.service.in new file mode 100644 index 000000000000..5fc04a3f5713 --- /dev/null +++ b/misc/systemd/nix-daemon.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=Nix Daemon +RequiresMountsFor=@storedir@ +RequiresMountsFor=@localstatedir@ +ConditionPathIsReadWrite=@localstatedir@/nix/daemon-socket + +[Service] +ExecStart=@@bindir@/nix-daemon nix-daemon --daemon +KillMode=process diff --git a/misc/systemd/nix-daemon.socket.in b/misc/systemd/nix-daemon.socket.in new file mode 100644 index 000000000000..9ed39ffe6eb2 --- /dev/null +++ b/misc/systemd/nix-daemon.socket.in @@ -0,0 +1,11 @@ +[Unit] +Description=Nix Daemon Socket +Before=multi-user.target +RequiresMountsFor=@storedir@ +ConditionPathIsReadWrite=@localstatedir@/nix/daemon-socket + +[Socket] +ListenStream=@localstatedir@/nix/daemon-socket/socket + +[Install] +WantedBy=sockets.target |