Create config builder to handle default config values#43672
Closed
matthewbauer wants to merge 1 commit intoNixOS:masterfrom
Closed
Create config builder to handle default config values#43672matthewbauer wants to merge 1 commit intoNixOS:masterfrom
matthewbauer wants to merge 1 commit intoNixOS:masterfrom
Conversation
Member
|
Conceptually I like this a lot.
|
Member
|
@GrahamcOfBorg eval |
bbf3f95 to
ded3cc3
Compare
6e237d0 to
b6e6b0d
Compare
e442579 to
7ac5390
Compare
pkgs/top-level/config.nix provides some defaults for the config values. This allows global defaults to be provided for config options & prevents individual packages for having to interpret the defaults. Hopefully this will make way for better documentation of configuration options. Eventually I want to move this into a proper module system, see (NixOS#39580). Other squashed commits: - check-meta: use default values from pkgs/top-level/config.nix We no longer have to check that these exist - their defaults are configured there. - config: propagate original config Lots of times we will have custom config options. We want these to still be accessible in Nixpkgs. - config: add packageOverrides One config option I originally missed. - config: fix licenses loop blacklistedLicenses & whitelistedLicense cannot depend on each other in their apply function. Instead just use the original config’. - treewide: remove ‘or’ default for configs these are now provided by config.nix - config: make types enforced config.shouldCheckMeta -> config.checkMeta This was the original name.
d44eca6 to
bf8d302
Compare
Member
|
!!! Great, ty! |
Member
|
N.B. #16531 tried it before. I think my views might have softened since then :). |
Member
Author
|
Closing for now. If someone wants to take this up, feel free... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
This is spun off from #39580. This just adds a config.nix file to handle common config values already in Nixpkgs. We can reuse the mkOption function from NixOS module system.