Split build and switch

This commit is contained in:
Charlotte Van Petegem 2020-10-05 20:27:35 +02:00
parent 2a0c27b031
commit 7e23a48ed1
No known key found for this signature in database
GPG key ID: 019E764B7184435A
3 changed files with 5 additions and 3 deletions

View file

@ -9,5 +9,4 @@ then
BUILD_ARGS+=("--override-input" "nixpkgs" "../nixpkgs" "--no-write-lock-file")
fi
sudo nix build --profile /nix/var/nix/profiles/system ".#nixosConfigurations.$(hostname).config.system.build.toplevel" --no-link "${BUILD_ARGS[@]}" && \
sudo nix shell -vv /nix/var/nix/profiles/system -c switch-to-configuration switch
sudo nix build --profile /nix/var/nix/profiles/system ".#nixosConfigurations.$(hostname).config.system.build.toplevel" --no-link "${BUILD_ARGS[@]}"

3
switch.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
sudo nix shell -vv /nix/var/nix/profiles/system -c switch-to-configuration switch

View file

@ -13,4 +13,4 @@ fi
nix flake update --update-input nixpkgs --update-input home-manager --update-input flake-utils
./build.sh
./build.sh && ./switch.sh