mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 08:17:01 +00:00
Add -H
to sudo nix-env [...]
to deal with warning
After NixOS/nix#6676, the following warning is displayed when running `darwin-rebuild switch`: warning: $HOME ('/Users/jamie') is not owned by you, falling back to the one defined in the 'passwd' file.
This commit is contained in:
parent
2f3c9bb364
commit
1da877d28c
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ fi
|
|||
|
||||
if [ "$action" = list ] || [ "$action" = rollback ]; then
|
||||
if [ "$USER" != root ] && [ ! -w $(dirname "$profile") ]; then
|
||||
sudo nix-env -p "$profile" "${extraProfileFlags[@]}"
|
||||
sudo -H nix-env -p "$profile" "${extraProfileFlags[@]}"
|
||||
else
|
||||
nix-env -p "$profile" "${extraProfileFlags[@]}"
|
||||
fi
|
||||
|
@ -178,7 +178,7 @@ if [ -z "$systemConfig" ]; then exit 0; fi
|
|||
|
||||
if [ "$action" = switch ]; then
|
||||
if [ "$USER" != root ] && [ ! -w $(dirname "$profile") ]; then
|
||||
sudo nix-env -p "$profile" --set "$systemConfig"
|
||||
sudo -H nix-env -p "$profile" --set "$systemConfig"
|
||||
else
|
||||
nix-env -p "$profile" --set "$systemConfig"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue