mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
nix: kickstart and wait for the nix-daemon service
This commit is contained in:
parent
80a8a591a9
commit
1436543221
3 changed files with 7 additions and 5 deletions
|
@ -8,9 +8,7 @@ matrix:
|
|||
- nix-build ./release.nix -I darwin=. -A tests
|
||||
- nix-build ./release.nix -I darwin=. -A examples.simple
|
||||
- yes | nix-shell -A installer
|
||||
- sudo launchctl kickstart system/org.nixos.nix-daemon # FIXME
|
||||
- nix-shell -A installer.check
|
||||
- /run/current-system/sw/bin/darwin-rebuild switch -I darwin=$HOME/.nix-defexpr/channels/darwin -I darwin-config=$HOME/.nixpkgs/darwin-configuration.nix
|
||||
- sudo launchctl kickstart system/org.nixos.nix-daemon # FIXME
|
||||
- yes | nix-shell -A uninstaller
|
||||
- nix-shell -A uninstaller.check
|
||||
|
|
|
@ -444,9 +444,13 @@ in
|
|||
|
||||
system.activationScripts.nix-daemon.text = mkIf cfg.useDaemon ''
|
||||
if ! diff /etc/nix/nix.conf /run/current-system/etc/nix/nix.conf &> /dev/null; then
|
||||
echo >&2 "reloading nix-daemon..."
|
||||
pkill -HUP nix-daemon
|
||||
echo "reloading nix-daemon..." >&2
|
||||
launchctl kill HUP system/org.nixos.nix-daemon
|
||||
fi
|
||||
while ! nix-store --store daemon -q --hash ${pkgs.stdenv.shell} &>/dev/null; do
|
||||
echo "waiting for nix-daemon" >&2
|
||||
launchctl kickstart system/org.nixos.nix-daemon
|
||||
done
|
||||
'';
|
||||
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@ in
|
|||
grep "<string>${cacert}/etc/ssl/certs/ca-certificates.crt</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
|
||||
echo checking nix-daemon reload in /activate >&2
|
||||
grep "pkill -HUP nix-daemon" ${config.out}/activate
|
||||
grep "launchctl kill HUP system/org.nixos.nix-daemon" ${config.out}/activate
|
||||
|
||||
echo checking NIX_REMOTE=daemon in setEnvironment >&2
|
||||
grep "NIX_REMOTE=daemon" ${config.system.build.setEnvironment}
|
||||
|
|
Loading…
Add table
Reference in a new issue