Avoid host mutation for early cache hints
This commit is contained in:
@@ -26,20 +26,18 @@ the AMI:
|
||||
```nix
|
||||
{
|
||||
quixosEarlyBuildNixConfig = {
|
||||
hosts = {
|
||||
"2600:..." = [ "nix-cache.internal.example.org" ];
|
||||
};
|
||||
substituters = [ "http://nix-cache.internal.example.org/cache" ];
|
||||
substituters = [ "http://[2600:...]/cache" ];
|
||||
trustedPublicKeys = [ "nix-cache.internal.example.org-1:..." ];
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
The AMI runner evaluates this output after writing `/etc/nixos/flake.nix`,
|
||||
appends the host hints to `/etc/hosts`, and passes the substituters and trusted
|
||||
public keys through `NIX_CONFIG` only for the first `nixos-rebuild switch`.
|
||||
The target NixOS configuration should still declare the same cache in
|
||||
`nix.settings` for all later rebuilds.
|
||||
The AMI runner evaluates this output after writing `/etc/nixos/flake.nix` and
|
||||
passes the substituters and trusted public keys through `NIX_CONFIG` only for
|
||||
the first `nixos-rebuild switch`. It does not mutate `/etc/hosts`; first-boot
|
||||
substituters that need private addressing should use a direct address URL. The
|
||||
target NixOS configuration should still declare the normal hostname-based cache
|
||||
in `nix.settings` and `networking.hosts` for all later rebuilds.
|
||||
|
||||
## Publish
|
||||
|
||||
|
||||
Reference in New Issue
Block a user