mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
nix-daemon: use wait4path
This prevents the service from starting (and thus failing) before the nix store is mounted.
This commit is contained in:
parent
3d50598ae0
commit
5fba29c1c8
3 changed files with 10 additions and 3 deletions
|
@ -44,7 +44,10 @@ in
|
|||
nix.useDaemon = true;
|
||||
|
||||
launchd.daemons.nix-daemon = {
|
||||
command = "${config.nix.package}/bin/nix-daemon";
|
||||
serviceConfig.ProgramArguments = [
|
||||
"/bin/sh" "-c"
|
||||
"/bin/wait4path ${config.nix.package}/bin/nix-daemon && exec ${config.nix.package}/bin/nix-daemon"
|
||||
];
|
||||
serviceConfig.ProcessType = mkDefault "Interactive";
|
||||
serviceConfig.LowPriorityIO = config.nix.daemonIONice;
|
||||
serviceConfig.Nice = config.nix.daemonNiceLevel;
|
||||
|
|
|
@ -14,7 +14,9 @@ in
|
|||
test = ''
|
||||
echo checking nix-daemon service in /Library/LaunchDaemons >&2
|
||||
grep "<string>org.nixos.nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "<string>exec ${nix}/bin/nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "<string>/bin/wait4path" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "&&" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "exec ${nix}/bin/nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
! grep "<key>Sockets</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ in
|
|||
test = ''
|
||||
echo checking nix-daemon service in /Library/LaunchDaemons >&2
|
||||
grep "<string>org.nixos.nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "<string>exec ${nix}/bin/nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "<string>/bin/wait4path" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "&&" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "exec ${nix}/bin/nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
! grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "<key>Sockets</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "/nix/var/nix/daemon-socket/socket" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
|
|
Loading…
Reference in a new issue