Skip to content

Conversation

@leonardolang
Copy link

This commit introduces a way to override the default substituters and trusted-public-keys copied from the reference machine.

A common use case is when the reference machine points to a local "proxy" binary cache (e.g., 127.0.0.1), which will not work on the target host.

Using --no-use-machine-substituters disables the feature altogether, while --option substituters <list> and --option extra-substituters <list> results in errors due to the user not being part of trusted-users.

This commit also changes how ~/.config/nix/nix.conf is created: it now stores a backup (with a .orig suffix) before patching the file, and reuses that backup on future invocations.

This avoids the situation where multiple runs of nixos-anywhere repeatedly append the same configuration over and over.

This commit introduces a way to override the default substituters and trusted-public-keys copied from the reference machine.

A common use case is when the reference machine points to a local "proxy" binary cache (e.g., 127.0.0.1), which will not work on the target host.

Using `--no-use-machine-substituters` disables the feature altogether, while `--option substituters <list>` and `--option extra-substituters <list>` results in errors due to the user not being part of trusted-users.

This commit also changes how `~/.config/nix/nix.conf` is created: it now stores a backup (with a `.orig` suffix) before patching the file, and reuses that backup on future invocations.

This avoids the situation where multiple runs of `nixos-anywhere` repeatedly append the same configuration over and over.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant