From 7e23a48ed1c94479818d19640ec5d4d22d03b064 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Mon, 5 Oct 2020 20:27:35 +0200 Subject: [PATCH] Split build and switch --- build.sh | 3 +-- switch.sh | 3 +++ update.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100755 switch.sh diff --git a/build.sh b/build.sh index 62c554c4..ff7565d4 100755 --- a/build.sh +++ b/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[@]}" diff --git a/switch.sh b/switch.sh new file mode 100755 index 00000000..73725946 --- /dev/null +++ b/switch.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sudo nix shell -vv /nix/var/nix/profiles/system -c switch-to-configuration switch diff --git a/update.sh b/update.sh index f848824b..ea398f48 100755 --- a/update.sh +++ b/update.sh @@ -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