You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is more of a bug report or feature request, but ultimately it's unexpected behavior to me and I couldn't find any other issues about this option...
nix-repl> :b homeConfigurations."ianchamberlain@MacBook-Pro".config.xdg.configFile."nix/nix.conf".source
error: builder for '/nix/store/7p3bzjm46nxh20kfyn76fbdf3qgy890g-nix.conf.drv' failed with exit code 1;
last 2 log lines:
> Validating generated nix.conf
> error: unknown setting 'unknown-setting'
For full logs, run 'nix log /nix/store/7p3bzjm46nxh20kfyn76fbdf3qgy890g-nix.conf.drv'.
I would propose one of two changes:
For checkConfig = false, skip the checkPhase entirely; the user has opted out of nix.conf validation
Add a new option allowUnknownSettings or something like that, which could be toggled separately from checkConfig and specifically allows unknown settings but not other errors.
The first choice seems much simpler to implement (happy to open a PR), but maybe the second choice would make sense as a way to enable syntax / type checking but still allow unknown settings? I guess it would allow for type checking of known features but not unknown features...
Maintainer CC
Nix module no longer has an active maintainer and git blame seems mostly like one-off changes... not sure who might be the right person to see this?
Thank you for your contribution!
I marked this issue as stale due to inactivity.
Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'.
We welcome additional information that will help resolve this issue.
Please read the relevant sections below before commenting.
If you are the original author of the issue
If this is resolved, please consider closing it so that the maintainers know not to focus on this.
If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
If you are not the original author of the issue
If you are also experiencing this issue, please add details of your situation to help with the debugging process.
If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Memorandum on closing issues
Don't be afraid to manually close an issue, even if it holds valuable information.
Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost!
Closing obsolete issues is an important way to help maintainers focus their time and effort.
Are you following the right branch?
Is there an existing issue for this?
Issue description
I'm not sure if this is more of a bug report or feature request, but ultimately it's unexpected behavior to me and I couldn't find any other issues about this option...
I have a simple config like
From the description of
checkConfig
, I assumed this would work: https://github.com/nix-community/home-manager/blob/master/modules/misc/nix.nix#L239C1-L246C7Especially since
nix.conf
allows unknown keys according to its manpages.However the
checkPhase
as written seems to specifically disallow unknown values regardless ofnix.checkConfig
: https://github.com/nix-community/home-manager/blob/master/modules/misc/nix.nix#L95-L97 and this results in a build failure:I would propose one of two changes:
checkConfig = false
, skip thecheckPhase
entirely; the user has opted out ofnix.conf
validationallowUnknownSettings
or something like that, which could be toggled separately fromcheckConfig
and specifically allows unknown settings but not other errors.The first choice seems much simpler to implement (happy to open a PR), but maybe the second choice would make sense as a way to enable syntax / type checking but still allow unknown settings? I guess it would allow for type checking of known features but not unknown features...
Maintainer CC
Nix module no longer has an active maintainer and
git blame
seems mostly like one-off changes... not sure who might be the right person to see this?System information
The text was updated successfully, but these errors were encountered: