Build first before needing root privs

This commit is contained in:
Charlotte Van Petegem 2021-02-26 10:10:49 +01:00
parent c9768a33c3
commit 34bfaff5d9
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -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