1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

installer: detect multi-user install

This commit is contained in:
Daiderd Jordan 2019-07-01 23:02:29 +02:00
parent bbedef2143
commit 462a17b1f1
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -27,7 +27,7 @@ stdenv.mkDerivation {
set -e
_PATH=$PATH
export PATH=/nix/var/nix/profiles/default/bin:${nix}/bin:${pkgs.openssh}/bin:/usr/bin:/bin:/usr/sbin:/sbin
export PATH=/nix/var/nix/profiles/default/bin:${nix}/bin:${pkgs.gnused}/bin:${pkgs.openssh}/bin:/usr/bin:/bin:/usr/sbin:/sbin
action=switch
while [ "$#" -gt 0 ]; do
@ -55,6 +55,11 @@ stdenv.mkDerivation {
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"
fi
# Skip when stdin is not a tty, eg.
# $ yes | darwin-installer
if test -t 0; then