Split build and switch
This commit is contained in:
parent
2a0c27b031
commit
7e23a48ed1
3 changed files with 5 additions and 3 deletions
3
build.sh
3
build.sh
|
@ -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
3
switch.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo nix shell -vv /nix/var/nix/profiles/system -c switch-to-configuration switch
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue