| Commit message (Expand) | Author | Age | Files | Lines |
| * | lib/modules: Allow an "anonymous" module with key in disabledModules•••This makes the following work
disabledModules = [ foo.nixosModules.bar ];
even if `bar` is not a path, but rather a module such as
{ key = "/path/to/foo#nixosModules.bar"; config = ...; }
By supporting this, the user will often be able to use the same syntax
for both importing and disabling a module. This is becoming more relevant
because flakes promote the use of attributes to reference modules. Not
all of these modules in flake attributes will be identifiable, but with
the help of a framework such as flake-parts, these attributes can be
guaranteed to be identifiable (by outPath + attribute path).
| Robert Hensing | 2023-03-01 | 1 | -5/+29 |
| * | lib/modules: make `mkAliasOptionModule` emit DocBook•••Follow-up to https://github.com/NixOS/nixpkgs/pull/208407
Removing `mdDoc` isn't enough, we need to emit actual DocBook.
| Naïm Favier | 2023-01-08 | 1 | -3/+5 |
| * | lib/modules: hide _module.args docs•••unfortunately we can't unconditionally make this text markdown without
impacting downstream users of docs generation (as noted in #175586).
hide it entirely until the transition is complete.
| pennae | 2023-01-05 | 1 | -0/+5 |
| * | modules: add mkAliasOptionModuleMD•••mkAliasOptionModule should not default to mdDoc descriptions because
that can break out-of-tree users of documentation infrastructure. add an
explicitly-MD variant for now, to be removed some time after the MD
transition is complete.
| pennae | 2023-01-05 | 1 | -2/+11 |
| * | lib: fix typos | figsoda | 2022-12-17 | 1 | -1/+1 |
| * | Merge pull request #204103 from ncfavier/doc-mkOrder•••nixos/doc: document `mkOrder` and friends | Valentin Gagarin | 2022-12-02 | 1 | -9/+10 |
| |\ |
|
| | * | nixos/doc: document `mkOrder` and friends•••Add a section on ordering option definitions.
Also mention `mkDefault` in the section on `mkOverride`.
Clarify the code a bit by renaming `defaultPriority` to
`defaultOverridePriority` and introducing `defaultOrderPriority`.
| Naïm Favier | 2022-12-02 | 1 | -9/+10 |
| * | | lib/modules: Add context to the "option does not exist" error•••Add trace items that provide context for a failed definition that
can not be caught within the Nix language.
This also adds a test for the `tryEval` behavior of `showDefs`.
| Robert Hensing | 2022-12-02 | 1 | -1/+12 |
| |/ |
|
| * | lib.modules.doRename: Don't define warning, even as undefined, if not warning.•••This fixes mkAliasOptionModule in systems with no warning option.
| Shea Levy | 2022-11-03 | 1 | -2/+2 |
| * | Merge pull request #193132 from figsoda/clean-up•••treewide: clean up | figsoda | 2022-10-01 | 1 | -9/+1 |
| |\ |
|
| | * | lib/modules.nix: remove unused bindings | figsoda | 2022-09-26 | 1 | -9/+1 |
| * | | Merge pull request #191540 from hercules-ci/nixosTest-modular•••nixosTest: make modular | Robert Hensing | 2022-09-28 | 1 | -1/+2 |
| |\ \
| |/
|/| |
|
| | * | lib/modules: Fix meta duplication in shorthand syntax | Robert Hensing | 2022-09-21 | 1 | -1/+2 |
| * | | lib/modules: add `definitionsWithLocations` to evaluated options•••This attr provides the location of each definition.
This is particularly useful for introspecting options of type
`attrsOf`. E.g., it allows finding the location of a systemd
service definition by parsing
`options.systemd.services.definitionsWithLocations`.
| Erik Arvstedt | 2022-09-05 | 1 | -0/+1 |
| |/ |
|
| * | Merge branch 'master' into option-docs-md | pennae | 2022-09-01 | 1 | -1/+3 |
| |\ |
|
| | * | lib.modules: support strings with absolute paths in `disabledModules`•••This is particularly useful for disabling modules defined in a flake.
Example:
disabledModules = [ "${flake}/modules/mymodule.nix" ];
Previously, absolute string paths were internally prepended with `modulesPath`,
which caused the module filtering to fail.
| Erik Arvstedt | 2022-08-31 | 1 | -1/+3 |
| * | | lib/modules: convert option description to MD | pennae | 2022-08-31 | 1 | -77/+43 |
| |/ |
|
| * | lib/modules: Add _module.specialArgs | Robert Hensing | 2022-07-21 | 1 | -0/+10 |
| * | lib/modules: Throw earlier when module function does not return attrs•••`m` must always be an attrset at this point. It is basically always
evaluated. This will make it throw when any of the attrs is accessed,
rather than just `config`. We assume that this will improve the error
message in more scenarios.
| Robert Hensing | 2022-06-14 | 1 | -3/+2 |
| * | lib.types: Add deferredModuleWith | Robert Hensing | 2022-06-14 | 1 | -1/+3 |
| * | lib/types, lib/modules: Remove unused extensionOffset | Robert Hensing | 2022-06-14 | 1 | -7/+1 |
| * | lib/modules: Fix missing prefix in extendModules when unset in both eval- and... | Robert Hensing | 2022-06-10 | 1 | -1/+1 |
| * | Merge pull request #167776 from hercules-ci/lib-modules-allow-disable-_module...•••lib.modules: Allow making _module.args internal | Robert Hensing | 2022-04-30 | 1 | -1/+4 |
| |\ |
|
| | * | lib.modules: Allow making _module.args internal•••This allows other module system consumers to
disable these docs via option merging.
For instance arion uses asciidoc instead of
docbook so that would look awful.
| Robert Hensing | 2022-04-11 | 1 | -1/+4 |
| * | | lib.types.submoduleWith: Avoid _key collisions after extendModules | Robert Hensing | 2022-04-24 | 1 | -1/+7 |
| |/ |
|
| * | Merge pull request #165540 from Infinisil/module-args-docs•••lib/modules: Document `_module.args` | Robert Hensing | 2022-04-05 | 1 | -3/+87 |
| |\ |
|
| | * | lib/modules: Document _module.args•••Documents the _module.args option, motivated by many usages in Flakes,
especially with the deprecation of extraArgs
(https://github.com/NixOS/nixpkgs/commit/78ada833615d241ed76463aa5a024b614150eb4d)
The documentation rendering for this option had to be handled a bit
specially, since it's not declared in nixos/modules like all the other
NixOS options.
Co-Authored-By: pennae <github@quasiparticle.net>
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
| Silvan Mosberger | 2022-04-05 | 1 | -3/+87 |
| * | | Merge pull request #164651 from Infinisil/remove-optionSet•••lib/modules: Finally remove deprecated types.optionSet | Silvan Mosberger | 2022-03-25 | 1 | -28/+6 |
| |\ \ |
|
| | * | | lib/modules: Finally remove deprecated types.optionSet•••types.optionSet has been deprecated for almost 10 years now
(0e333688cea468a28516bf6935648c03ed62a7bb)! A removal
was already attempted in 2019
(27982b408e465554b8831f492362bc87ed0ec02a), but it was promptly
reinstantiated since some third-party uses were discovered
(f531ce75e4178c6867cc1d0f7fec96b2d5c3f1cb).
It's finally time to remove it for good :)
| Silvan Mosberger | 2022-03-18 | 1 | -28/+6 |
| * | | | Merge remote-tracking branch 'upstream/master' into tests-restrict-arguments | Robert Hensing | 2022-03-21 | 1 | -12/+82 |
| |\ \ \
| | |/
| |/| |
|
| | * | | Merge pull request #163451 from hercules-ci/stop-premature-warnings•••Stop premature warnings, including `nix.settings` migration | Kevin Cox | 2022-03-21 | 1 | -0/+20 |
| | |\ \
| | |/
| |/| |
|
| | | * | lib.mkRenamedOptionModuleWith: Remove warnWhenRead•••Let's keep things simple and not poke holes in the
improved migration process.
| Robert Hensing | 2022-03-21 | 1 | -9/+1 |
| | | * | lib: Add mkRenamedOptionModuleWith•••Adds support for sinceRelease
| Robert Hensing | 2022-03-09 | 1 | -0/+28 |
| | * | | Merge pull request #156533 from hercules-ci/issue-146882-transparent-submodul...•••lib.modules: Let module declare options directly in bare submodule | Silvan Mosberger | 2022-03-16 | 1 | -12/+62 |
| | |\ \ |
|
| | | * | | lib/modules.nix: Add comment about internal shorthand null value | Robert Hensing | 2022-03-07 | 1 | -0/+3 |
| | | * | | lib/modules.nix: Move comment to the actual legacy code | Robert Hensing | 2022-03-07 | 1 | -3/+4 |
| | | * | | Revert "lib.modules: Remove redundant fixupOptionType in option injection"•••This reverts commit 6b077c47ff14cb9a4a8f5cb8986fa83ff626c732.
Thanks Infinisil for discovering this problem:
> After a lot of trial and error, trying to prove why fixupOptionType should
> be used here or not, I figured it out: It's needed for the sake of file
> locations in error messages.
| Robert Hensing | 2022-03-07 | 1 | -1/+1 |
| | | * | | lib.modules: Remove redundant fixupOptionType in option injection | Robert Hensing | 2022-03-03 | 1 | -1/+1 |
| | | * | | lib.modules: Make option injection work when shorthandOnlyDefinesConfig | Robert Hensing | 2022-03-03 | 1 | -0/+1 |
| | | * | | lib.modules: Improve option-is-prefix error message | Robert Hensing | 2022-03-03 | 1 | -3/+21 |
| | | * | | lib.modules: Explain why options can only be merged into submodules | Robert Hensing | 2022-03-03 | 1 | -0/+9 |
| | | * | | lib.modules: Refactor option scanning slightly•••This scans the options with fewer function calls, improving performance.
It also removes a let Env from the happy flow of the new logic.
| Robert Hensing | 2022-03-03 | 1 | -10/+8 |
| | | * | | lib.types.submodule: Remove redundant isSubmodule attr | Robert Hensing | 2022-03-03 | 1 | -1/+1 |
| | | * | | lib.modules: Let module declare options directly in bare submodule•••... where a bare submodule is an option that has a type like
`submoduleWith x`, as opposed to `attrsOf (submoduleWith x)`.
This makes migration unnecessary when introducing a freeform type
in an existing option tree.
Closes #146882
| Robert Hensing | 2022-03-03 | 1 | -1/+21 |
| | | |/ |
|
| * | / | lib: applyIfFunction -> applyModuleArgsIfFunction | Robert Hensing | 2022-03-21 | 1 | -3/+3 |
| |/ / |
|
| * / | lib/modules.nix: Optimize optionSet legacy compat code•••It's still in the hot path.
| Robert Hensing | 2022-03-07 | 1 | -5/+5 |
| |/ |
|
| * | lib.modules: Use types.optionType for _module.freeformType•••This ensures that the module file locations are propagated to the
freeform type, which makes it so that submodules in freeform types now
have their declaration location shown in the manual, fixing
https://github.com/NixOS/nixpkgs/issues/132085.
In addition, this also newly allows freeformTypes to be declared
multiple times and all declarations being merged together according to
normal option merging.
This also removes some awkwardness regarding the type of `freeformType`
| Silvan Mosberger | 2022-03-01 | 1 | -2/+1 |
| * | lib/modules: Use types.raw for _module.args•••Fixes https://github.com/NixOS/nixpkgs/issues/53458, as types.raw
doesn't allow setting multiple values
| Silvan Mosberger | 2022-02-22 | 1 | -1/+1 |
| * | lib/modules: introduce setDefaultModuleLocation•••Wraps a module with a default location for reporting errors.
| Naïm Favier | 2022-01-27 | 1 | -5/+7 |
| * | lib/modules: extract multiply-used value in byName•••module.${attr} is used at least twice, so it must be evaluated at least
twice (and since it's a function argument, be turned into a thunk
twice).
| pennae | 2021-12-28 | 1 | -4/+4 |