Don't update flake.lock when building from a local nixpkgs
This commit is contained in:
parent
74573c6eb0
commit
f3b7697207
2 changed files with 12 additions and 21 deletions
14
update.sh
14
update.sh
|
@ -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[@]}" && \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue