Install systemd units
This commit is contained in:
parent
8e5fbf4d73
commit
84d6936371
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -108,6 +108,9 @@ Makefile.config
|
||||||
/perl/lib/Nix/Config.pm
|
/perl/lib/Nix/Config.pm
|
||||||
/perl/lib/Nix/Store.cc
|
/perl/lib/Nix/Store.cc
|
||||||
|
|
||||||
|
/misc/systemd/nix-daemon.service
|
||||||
|
/misc/systemd/nix-daemon.socket
|
||||||
|
|
||||||
*.a
|
*.a
|
||||||
*.o
|
*.o
|
||||||
*.so
|
*.so
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -16,6 +16,7 @@ makefiles = \
|
||||||
perl/local.mk \
|
perl/local.mk \
|
||||||
scripts/local.mk \
|
scripts/local.mk \
|
||||||
corepkgs/local.mk \
|
corepkgs/local.mk \
|
||||||
|
misc/systemd/local.mk \
|
||||||
misc/emacs/local.mk \
|
misc/emacs/local.mk \
|
||||||
doc/manual/local.mk \
|
doc/manual/local.mk \
|
||||||
tests/local.mk
|
tests/local.mk
|
||||||
|
|
1
misc/systemd/local.mk
Normal file
1
misc/systemd/local.mk
Normal file
|
@ -0,0 +1 @@
|
||||||
|
$(foreach n, nix-daemon.socket nix-daemon.service, $(eval $(call install-file-in, $(d)/$(n), $(libdir)/systemd/system, 0644)))
|
|
@ -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
|
|
9
misc/systemd/nix-daemon.service.in
Normal file
9
misc/systemd/nix-daemon.service.in
Normal file
|
@ -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
|
11
misc/systemd/nix-daemon.socket.in
Normal file
11
misc/systemd/nix-daemon.socket.in
Normal file
|
@ -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
|
|
@ -132,14 +132,6 @@ done
|
||||||
# (until this is fixed in the relevant Makefile)
|
# (until this is fixed in the relevant Makefile)
|
||||||
chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/nix.sh
|
chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/nix.sh
|
||||||
|
|
||||||
# systemd not available on RHEL yet
|
|
||||||
%if ! 0%{?rhel}
|
|
||||||
# install systemd service descriptor
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system
|
|
||||||
cp -p misc/systemd/nix-daemon.service \
|
|
||||||
$RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Copy the byte-compiled mode file by hand
|
# Copy the byte-compiled mode file by hand
|
||||||
cp -p misc/emacs/nix-mode.elc $RPM_BUILD_ROOT%{_emacs_sitelispdir}/
|
cp -p misc/emacs/nix-mode.elc $RPM_BUILD_ROOT%{_emacs_sitelispdir}/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue