Build first before needing root privs
This commit is contained in:
parent
c9768a33c3
commit
34bfaff5d9
1 changed files with 2 additions and 0 deletions
|
@ -15,7 +15,9 @@ nix flake update --recreate-lock-file
|
|||
|
||||
if [ -z "${OVERRIDE:-}" ]
|
||||
then
|
||||
nix build --no-link --profile /nix/var/nix/profiles/per-user/charlotte/`hostname` .#nixosConfigurations.`hostname`.config.system.build.toplevel
|
||||
su -c "nixos-rebuild --flake . switch"
|
||||
else
|
||||
nix build --no-link --override-input nixpkgs ../nixpkgs --no-write-lock-file --profile /nix/var/nix/profiles/per-user/charlotte/`hostname` .#nixosConfigurations.`hostname`.config.system.build.toplevel
|
||||
su -c "nixos-rebuild --flake . --override-input nixpkgs ../nixpkgs --no-write-lock-file switch"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue