1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-30 19:54:43 +00:00

Merge pull request #201 from jamesottaway/only-sed-simple-example

Only enable `services.nix-daemon` when no config is present upon install
This commit is contained in:
Daiderd Jordan 2020-05-25 20:05:02 +02:00 committed by GitHub
commit f0552188ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.