-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
checks: check /etc/nix/nix.custom.conf
hash
#1266
Conversation
3932fa1
to
97679ad
Compare
# Generated by https://github.com/DeterminateSystems/nix-installer. | ||
# See `/nix/nix-installer --version` for the version details. | ||
|
||
!include nix.custom.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be at the bottom to be able to override their defaults?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, yeah. This is what’s shipped in the wild in v0.33.0, though, so I think we have to handle this version of the file anyway.
97679ad
to
b199a52
Compare
A new version with the relevant PR has been released; I’ve tested the code and fixed it to use |
f9eefa6
to
edee959
Compare
Updated for the new hashes in v0.34.0; confirmed that it still works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
modules/nix/default.nix
Outdated
@@ -823,8 +823,58 @@ in | |||
]); | |||
users.knownGroups = mkIf cfg.configureBuildUsers [ "nixbld" ]; | |||
|
|||
# The Determinate Systems installer puts user‐specified settings in | |||
# `/etc/nix/nix.custom.conf` since vX.YY.Z. Supplement the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this is meant to have an actual version number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, fixed.
edee959
to
8abb2e7
Compare
After DeterminateSystems/nix-installer#1379, the Determinate Systems installer will write custom user configuration to
nix.custom.conf
and include it fromnix.conf
. We need to check for its presence and error out if it contains any settings so as to not inadvertently clobber user configuration. The error message here could maybe be improved but it’s better than not handling it at all.Drafted until that PR is ready to ship and we know what the hash of the
nix.conf
and emptynix.custom.conf
will be.This should land before #1259 if it’s ready in time, or else get backported.
Note: This work was funded by Determinate Systems. The design is my own.