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:
parent
bbedef2143
commit
462a17b1f1
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue