From bfbc0c60cc49f14c6404195fd6eb50c3a5533e19 Mon Sep 17 00:00:00 2001 From: John Soo Date: Tue, 30 Nov 2021 15:33:15 -0800 Subject: [PATCH] darwin-store: Ensure NIX_ROOT is mounted after reboot. When a darwin host is rebooted, /nix was not mounted. Let the daemon also wait until the store mounting service is finished. --- misc/launchd/org.nixos.nix-daemon.plist.in | 8 +++----- scripts/create-darwin-volume.sh | 10 +++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/misc/launchd/org.nixos.nix-daemon.plist.in b/misc/launchd/org.nixos.nix-daemon.plist.in index 7fec653e0..bc02dc72c 100644 --- a/misc/launchd/org.nixos.nix-daemon.plist.in +++ b/misc/launchd/org.nixos.nix-daemon.plist.in @@ -13,14 +13,12 @@ org.nixos.nix-daemon KeepAlive - PathState + OtherJobEnabled - /nix/var/nix/profiles/default/bin/nix-daemon - + org.nixos.darwin-store + - RunAtLoad - ProgramArguments /nix/var/nix/profiles/default/bin/nix-daemon diff --git a/scripts/create-darwin-volume.sh b/scripts/create-darwin-volume.sh index 334b75045..f2cf4cba6 100755 --- a/scripts/create-darwin-volume.sh +++ b/scripts/create-darwin-volume.sh @@ -303,8 +303,16 @@ generate_mount_daemon() { - RunAtLoad + LaunchOnlyOnce + KeepAlive + + PathState + + $NIX_ROOT/store + + + Label org.nixos.darwin-store ProgramArguments