diff --git a/README.md b/README.md index c2d130e1..ec47e1eb 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ git add ./hosts/${new_host}.nix # You can specify any of the host configurations living in the ./hosts # directory. If omitted, it will default to your systems current hostname. +# This will be run as root. rebuild $new_host switch ``` diff --git a/shell.nix b/shell.nix index 95264c12..a8af3c79 100644 --- a/shell.nix +++ b/shell.nix @@ -10,9 +10,9 @@ let elif [[ $1 == "iso" ]]; then nix build ${configs}.niximg.${build}.isoImage elif [[ -z $2 ]]; then - nix run -vv ${configs}.${hostname}.${build}.toplevel -c switch-to-configuration $1 + sudo -E nix run -vv ${configs}.${hostname}.${build}.toplevel -c switch-to-configuration $1 else - nix run -vv ${configs}.$1.${build}.toplevel -c switch-to-configuration $2 + sudo -E nix run -vv ${configs}.$1.${build}.toplevel -c switch-to-configuration $2 fi ''; in pkgs.mkShell {