aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nix/flake.cc3
-rw-r--r--tests/flakes.sh3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 9b23570bd..dc576c82d 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -119,6 +119,9 @@ struct CmdFlakeUpdate : FlakeCommand
void run(nix::ref<nix::Store> store) override
{
+ /* Use --refresh by default for 'nix flake update'. */
+ settings.tarballTtl = 0;
+
lockFlake();
}
};
diff --git a/tests/flakes.sh b/tests/flakes.sh
index 2e4abf48d..57081f72f 100644
--- a/tests/flakes.sh
+++ b/tests/flakes.sh
@@ -589,8 +589,7 @@ nix flake info --json hg+file://$flake5Dir
nix build -o $TEST_ROOT/result hg+file://$flake5Dir --no-registries --no-allow-dirty
# Test tarball flakes
-rm -rf $flake5Dir/.hg
-tar cfz $TEST_ROOT/flake.tar.gz -C $TEST_ROOT flake5
+tar cfz $TEST_ROOT/flake.tar.gz -C $TEST_ROOT --exclude .hg flake5
nix build -o $TEST_ROOT/result file://$TEST_ROOT/flake.tar.gz