From 32fa78821febc229f99cd907c9133d728d27db74 Mon Sep 17 00:00:00 2001 From: James Ottaway Date: Sun, 17 May 2020 21:58:14 +1000 Subject: [PATCH] Only enable `services.nix-daemon` when no config is present upon install --- pkgs/darwin-installer/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/darwin-installer/default.nix b/pkgs/darwin-installer/default.nix index b221cc0..fcd2a8a 100644 --- a/pkgs/darwin-installer/default.nix +++ b/pkgs/darwin-installer/default.nix @@ -54,11 +54,11 @@ stdenv.mkDerivation { mkdir -p "$HOME/.nixpkgs" cp "${toString ../../modules/examples/simple.nix}" "$config" chmod u+w "$config" - fi - # Enable nix-daemon service for multi-user installs. - if [ ! -w /nix/var/nix/db ]; then - sed -i 's/# services.nix-daemon.enable/services.nix-daemon.enable/' "$config" + # Enable nix-daemon service for multi-user installs. + if [ ! -w /nix/var/nix/db ]; then + sed -i 's/# services.nix-daemon.enable/services.nix-daemon.enable/' "$config" + fi fi # Skip when stdin is not a tty, eg.