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:-}" ]
|
if [ -z "${OVERRIDE:-}" ]
|
||||||
then
|
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"
|
su -c "nixos-rebuild --flake . switch"
|
||||||
else
|
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"
|
su -c "nixos-rebuild --flake . --override-input nixpkgs ../nixpkgs --no-write-lock-file switch"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue