From 7c1d26ca8996f91c85c2aa6695bf92196195edd2 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Tue, 7 Apr 2020 13:06:09 +0200 Subject: [PATCH] Rebuild nixos and home-manager together This makes better use of parallelization and hopefully will fail earlier if there is an issue. Possible since https://github.com/rycee/home-manager/pull/1099 --- rebuild.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rebuild.sh b/rebuild.sh index 62ca4309..3ff7190c 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -15,8 +15,7 @@ NIXPKGS="$(nix eval --raw '(import ./nixpkgs.nix)')" export NIX_PATH="nixpkgs=$NIXPKGS:$NIX_PATH" # First build both systems using nix 2 -nix build '(with import { }; system)' || exit $? -nix run nixpkgs.home-manager -c home-manager -2 build || exit $? +nix build '(with import { }; system)' $( nix run nixpkgs.home-manager -c home-manager instantiate || exit $? ) || exit $? # Now switch both systems. If the build succeeded, this hopefully won't fail sudo NIXPKGS="$NIXPKGS" nixos-rebuild switch