1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-11-13 04:56:53 +03:00

Only enable services.nix-daemon when no config is present upon install

This commit is contained in:
James Ottaway 2020-05-17 21:58:14 +10:00
parent 5f6d300a2d
commit 32fa78821f

View File

@ -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.