From 54ce22e8ea64a91744a09bcf61b61a3e55b4f9d6 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Tue, 28 Jul 2020 09:36:20 +0200 Subject: [PATCH] Rebase nixpkgs in update script --- update.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index e2ac9a72..44eeaa12 100755 --- a/update.sh +++ b/update.sh @@ -2,8 +2,6 @@ set -euo pipefail set -x -nix flake update --update-input nixpkgs --update-input home-manager --update-input flake-utils - BUILD_ARGS=( "--extra-substituters" "ssh://charlotte@sunspear.vanpetegem.me" @@ -14,7 +12,14 @@ BUILD_ARGS=( if [ -d "../nixpkgs" -a -z "${NO_LOCAL:-}" ] then BUILD_ARGS+=("--override-input" "nixpkgs" "../nixpkgs" "--no-write-lock-file") + pushd ../nixpkgs + git fetch --all --prune + git rebase upstream/nixos-unstable-small || exit 1 + git push || exit 1 + popd fi +nix flake update --update-input nixpkgs --update-input home-manager --update-input flake-utils + sudo nix build --profile /nix/var/nix/profiles/system ".#nixosConfigurations.$(hostname).config.system.build.toplevel" --no-link "${BUILD_ARGS[@]}" && \ sudo nix --experimental-features "nix-command flakes" shell -vv /nix/var/nix/profiles/system -c switch-to-configuration switch