Add --refresh to force fresh git resolution, not a cached rev
hl-fwdesk's nix resolved git+ssh://.../hermenix.git?ref=main against a cached ref->rev mapping from an earlier fetch this session, running a stale commit's nu/hermenix.nu (from before flake.lock existed) and hitting the exact same "cannot write modified lock file" error again despite both fixes already being pushed. --refresh forces Nix to check Gitea for the current tip on every invocation instead of trusting the cached resolution (respects tarball-ttl otherwise) - required given the whole design point is "always run whatever's current, no manual pull." Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
825094c4cf
commit
67477953f1
1 file changed
+3
-3
+3
-3
@@ -292,11 +292,11 @@ def "main setup" [
|
||||
note "The extra substituter flags stop you compiling Determinate Nix yourself."
|
||||
note "--impure is needed to read /etc/hermenix/local.nix at eval time."
|
||||
if (confirm "Build now? (first run can take a while)") {
|
||||
^nix build --impure --no-write-lock-file $"($flake)#hermes-guest-image" --option extra-substituters $determinate_sub --option extra-trusted-public-keys $determinate_key
|
||||
^nix build --impure --no-write-lock-file --refresh $"($flake)#hermes-guest-image" --option extra-substituters $determinate_sub --option extra-trusted-public-keys $determinate_key
|
||||
ok "built"
|
||||
} else {
|
||||
say "Skipped. Run manually:"
|
||||
note $" nix build --impure --no-write-lock-file ($flake)#hermes-guest-image \\"
|
||||
note $" nix build --impure --no-write-lock-file --refresh ($flake)#hermes-guest-image \\"
|
||||
note $" --option extra-substituters ($determinate_sub) \\"
|
||||
note $" --option extra-trusted-public-keys ($determinate_key)"
|
||||
}
|
||||
@@ -486,7 +486,7 @@ def "main remote" [
|
||||
}
|
||||
|
||||
let quoted_args = ($args | each {|a| shquote $a } | str join " ")
|
||||
let remote_cmd = $"nix run --no-write-lock-file (shquote $flake)#hermenix -- ($quoted_args)"
|
||||
let remote_cmd = $"nix run --no-write-lock-file --refresh (shquote $flake)#hermenix -- ($quoted_args)"
|
||||
|
||||
say $"Running on ($host): ($args | str join ' ')"
|
||||
^ssh -t -o StrictHostKeyChecking=accept-new $host $remote_cmd
|
||||
|
||||
Reference in new issue
Block a user