1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 00:16:11 -04:00
This commit is contained in:
unrooted 2024-10-13 16:03:43 +02:00 committed by GitHub
commit 5acb4f749d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,4 @@
type = process
command = /nix/var/nix/profiles/default/bin/nix-daemon --daemon
smooth-recovery = true
logfile = /var/run/nix-daemon.log

View file

@ -0,0 +1,7 @@
#!/sbin/openrc-run
name="${RC_SVCNAME}"
description="Nix Daemon"
command_args_background="--daemon"
pidfile="/var/run/nix-daemon.pid"
command="/nix/var/nix/profiles/default/bin/nix-daemon"

View file

@ -0,0 +1,3 @@
#!/bin/sh
sv check nix >/dev/null || exit 1
exec /nix/var/nix/profiles/default/bin/nix-daemon --daemon

View file

@ -0,0 +1,11 @@
define nix-daemon
(make <service>
#:provides '(nix-daemon)
#:docstring "nix-daemon, the nix package manager's daemon"
#:start (make-forkexec-constructor
'("/nix/var/nix/profiles/default/bin/nix-daemon"))
#:stop (make-kill-destructor)
#:respawn? #t)
(register-services nix-daemon)
(start nix-daemon)