Rebase nixpkgs in update script
This commit is contained in:
parent
b53323a783
commit
54ce22e8ea
1 changed files with 7 additions and 2 deletions
|
@ -2,8 +2,6 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
nix flake update --update-input nixpkgs --update-input home-manager --update-input flake-utils
|
|
||||||
|
|
||||||
BUILD_ARGS=(
|
BUILD_ARGS=(
|
||||||
"--extra-substituters"
|
"--extra-substituters"
|
||||||
"ssh://charlotte@sunspear.vanpetegem.me"
|
"ssh://charlotte@sunspear.vanpetegem.me"
|
||||||
|
@ -14,7 +12,14 @@ BUILD_ARGS=(
|
||||||
if [ -d "../nixpkgs" -a -z "${NO_LOCAL:-}" ]
|
if [ -d "../nixpkgs" -a -z "${NO_LOCAL:-}" ]
|
||||||
then
|
then
|
||||||
BUILD_ARGS+=("--override-input" "nixpkgs" "../nixpkgs" "--no-write-lock-file")
|
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
|
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 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
|
sudo nix --experimental-features "nix-command flakes" shell -vv /nix/var/nix/profiles/system -c switch-to-configuration switch
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue