Standardize rebuild script across platforms

This commit is contained in:
Dave Gallant
2021-10-24 11:03:47 -04:00
parent 48d0beb50d
commit c2e694fdf6
3 changed files with 14 additions and 19 deletions

View File

@@ -10,7 +10,7 @@ Darwin*) machine=mac ;;
esac
if [[ "$machine" == "linux" ]]; then
exec nixos-rebuild -I nixos-config="machines/$(hostname)/configuration.nix" "$@" --flake '.#'
sudo nixos-rebuild -I nixos-config="machines/$(hostname)/configuration.nix" "$@" --flake '.#'
elif [[ "$machine" == "mac" ]]; then
exec darwin-rebuild "$@" --flake .
else