Skip to content

Commit

Permalink
Merge pull request #184 from qowoz/runnixdarwin
Browse files Browse the repository at this point in the history
runNixDarwin: add `-H` to sudo
  • Loading branch information
roberth authored Jan 30, 2025
2 parents afd0a42 + 79bb322 commit 6d1b6d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion effects/nix-darwin/run-nix-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ mkEffect (removeAttrs args [ "configuration" "ssh" "config" "system" "nix-darwin
echo >&2 "remote nix version:"
nix-env --version >&2
if [ "$USER" != root ] && [ ! -w $(dirname "${profilePath}") ]; then
sudo nix-env -p ${profilePath} --set ${toplevel}
sudo -H nix-env -p ${profilePath} --set ${toplevel}
else
nix-env -p ${profilePath} --set ${toplevel}
fi
Expand Down

0 comments on commit 6d1b6d5

Please sign in to comment.