-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated nix.conf
is not deterministic
#562
Comments
I should note also that the order is not completely irrelevant:
but I don't know if this is relevant to |
This is unfortunately a consequence of our |
FWIW, only the order of the file on a clean install really matters for us, since it's just a matter of having a consistent hash. Anyone doing customization pre-install hopefully knows what they're doing already and can add the hash or manually move the file away. So just removing the nondeterminism from the added options would be adequate for us, even though it might be worth considering ordering in general due to the odd behaviour of the |
When testing the installer in clean macOS VMs, @Enzime and I obtained
nix.conf
files with the exact same settings, but in different orders. I assume this is due to iterating through a randomized hash map in the unspecified internal order or similar.I realize that the user can supply settings that can affect the resulting configuration, but it would be really helpful for us (nix-darwin) if the default
nix.conf
file had a consistent and predictable hash. Plus, isn't unnecessary unreproducibility just not very Nix? :)(It'd be even better if the file did not contain the full
nix-installer
version but just an integer that only increments on changes that might materially affect the outputnix.conf
file, but I can understand why you would not want to do this.)The text was updated successfully, but these errors were encountered: