Don't update flake.lock when building from a local nixpkgs

This commit is contained in:
Charlotte Van Petegem 2020-07-23 22:15:42 +02:00
parent 74573c6eb0
commit f3b7697207
2 changed files with 12 additions and 21 deletions

View file

@ -4,19 +4,11 @@ set -x
nix flake update
BUILD_ARGS=(
"--builders"
"ssh://charlotte@sunspear.vanpetegem.me"
"--builders-use-substitutes"
"--extra-substituters"
"ssh://charlotte@sunspear.vanpetegem.me"
"--trusted-public-keys"
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= sunspear-nix-cache:4mgL4qS7EweCug1gAFiZKgQK+xuoJMBYThIUE+kPX4s="
)
BUILD_ARGS=()
if [ -d "../nixpkgs" ]
if [ -d "../nixpkgs" -a -z "${NO_LOCAL:-}" ]
then
BUILD_ARGS+=("--override-input" "nixpkgs" "../nixpkgs")
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[@]}" && \