-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
nixos/nix: add nix.settings.extra-system-features #382766
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
base: master
Are you sure you want to change the base?
nixos/nix: add nix.settings.extra-system-features #382766
Conversation
Thaigersprint/thaigersprint-2025#1 Co-authored-by: Jeremy Fleischman <jeremyfleischman@gmail.com>
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.
Diff LGTM but I fail to understand why is that attribute needed.
Thank you for the review, @drupol. Of course, this is not motivated by need. This is a drive-by PR motivated by my usage of this nix option. Fits in the "nice to have" category. Nix configuration options don't change frequently, so I think we can afford to include options for all of them. But that's obviously not what is implemented here. |
''; | ||
}; | ||
|
||
extra-system-features = mkOption { |
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.
Given that settings.system-features
already will do merge across the whole of the nixos module system, why do we need to document this option?
Why is it nice to have? What is the use-case in NixOS over just using the system-features option? |
TLDR; I wanted to let the readers of Providing a value for So, the value of the But that value is already provided by this NixOS module, because nix.settings.system-features = [
"<explicitly provide>"
"<the default features>"
"add-some-feature"
]; which carries the risk of missing out on future default features. This PR adds a documentation reference from |
That reasoning didn't came across when reading the current description. As of now we define both options and it's unclear which one is the right one to use for which use-case. However I am wondering if we should not instead move the default from lib.mkOption to |
Looks like this is what did this before but it got removed by @ck3d https://github.com/NixOS/nixpkgs/pull/372878/files |
@ck3d your intent from the pull request doesn't seem to match up with the change you did:
The former behavior merged existing system-features but now this no longer the case. |
Alternative fix #383052 |
Thaigersprint/thaigersprint-2025#1
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.