Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2022-11-03 | lib.modules.doRename: Don't define warning, even as undefined, if not warning. | Shea Levy | 1 | -2/+2 | |
This fixes mkAliasOptionModule in systems with no warning option. | |||||
2022-10-01 | Merge pull request #193132 from figsoda/clean-up | figsoda | 1 | -9/+1 | |
treewide: clean up | |||||
2022-09-28 | Merge pull request #191540 from hercules-ci/nixosTest-modular | Robert Hensing | 1 | -1/+2 | |
nixosTest: make modular | |||||
2022-09-26 | lib/modules.nix: remove unused bindings | figsoda | 1 | -9/+1 | |
2022-09-21 | lib/modules: Fix meta duplication in shorthand syntax | Robert Hensing | 1 | -1/+2 | |
2022-09-05 | lib/modules: add `definitionsWithLocations` to evaluated options | Erik Arvstedt | 1 | -0/+1 | |
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`. | |||||
2022-09-01 | Merge branch 'master' into option-docs-md | pennae | 1 | -1/+3 | |
2022-08-31 | lib/modules: convert option description to MD | pennae | 1 | -77/+43 | |
2022-08-31 | lib.modules: support strings with absolute paths in `disabledModules` | Erik Arvstedt | 1 | -1/+3 | |
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. | |||||
2022-07-21 | lib/modules: Add _module.specialArgs | Robert Hensing | 1 | -0/+10 | |
2022-06-14 | lib/modules: Throw earlier when module function does not return attrs | Robert Hensing | 1 | -3/+2 | |
`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. | |||||
2022-06-14 | lib.types: Add deferredModuleWith | Robert Hensing | 1 | -1/+3 | |
2022-06-14 | lib/types, lib/modules: Remove unused extensionOffset | Robert Hensing | 1 | -7/+1 | |
2022-06-10 | lib/modules: Fix missing prefix in extendModules when unset in both eval- ↵ | Robert Hensing | 1 | -1/+1 | |
and extend- | |||||
2022-04-30 | Merge pull request #167776 from ↵ | Robert Hensing | 1 | -1/+4 | |
hercules-ci/lib-modules-allow-disable-_modules.args-docs-internal lib.modules: Allow making _module.args internal | |||||
2022-04-24 | lib.types.submoduleWith: Avoid _key collisions after extendModules | Robert Hensing | 1 | -1/+7 | |
2022-04-11 | lib.modules: Allow making _module.args internal | Robert Hensing | 1 | -1/+4 | |
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. | |||||
2022-04-05 | Merge pull request #165540 from Infinisil/module-args-docs | Robert Hensing | 1 | -3/+87 | |
lib/modules: Document `_module.args` | |||||
2022-04-05 | lib/modules: Document _module.args | Silvan Mosberger | 1 | -3/+87 | |
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> | |||||
2022-03-25 | Merge pull request #164651 from Infinisil/remove-optionSet | Silvan Mosberger | 1 | -28/+6 | |
lib/modules: Finally remove deprecated types.optionSet | |||||
2022-03-21 | Merge remote-tracking branch 'upstream/master' into tests-restrict-arguments | Robert Hensing | 1 | -12/+82 | |
2022-03-21 | lib: applyIfFunction -> applyModuleArgsIfFunction | Robert Hensing | 1 | -3/+3 | |
2022-03-21 | Merge pull request #163451 from hercules-ci/stop-premature-warnings | Kevin Cox | 1 | -0/+20 | |
Stop premature warnings, including `nix.settings` migration | |||||
2022-03-21 | lib.mkRenamedOptionModuleWith: Remove warnWhenRead | Robert Hensing | 1 | -9/+1 | |
Let's keep things simple and not poke holes in the improved migration process. | |||||
2022-03-18 | lib/modules: Finally remove deprecated types.optionSet | Silvan Mosberger | 1 | -28/+6 | |
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 :) | |||||
2022-03-16 | Merge pull request #156533 from ↵ | Silvan Mosberger | 1 | -12/+62 | |
hercules-ci/issue-146882-transparent-submodule-options lib.modules: Let module declare options directly in bare submodule | |||||
2022-03-09 | lib: Add mkRenamedOptionModuleWith | Robert Hensing | 1 | -0/+28 | |
Adds support for sinceRelease | |||||
2022-03-07 | lib/modules.nix: Add comment about internal shorthand null value | Robert Hensing | 1 | -0/+3 | |
2022-03-07 | lib/modules.nix: Move comment to the actual legacy code | Robert Hensing | 1 | -3/+4 | |
2022-03-07 | lib/modules.nix: Optimize optionSet legacy compat code | Robert Hensing | 1 | -5/+5 | |
It's still in the hot path. | |||||
2022-03-07 | Revert "lib.modules: Remove redundant fixupOptionType in option injection" | Robert Hensing | 1 | -1/+1 | |
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. | |||||
2022-03-03 | lib.modules: Remove redundant fixupOptionType in option injection | Robert Hensing | 1 | -1/+1 | |
2022-03-03 | lib.modules: Make option injection work when shorthandOnlyDefinesConfig | Robert Hensing | 1 | -0/+1 | |
2022-03-03 | lib.modules: Improve option-is-prefix error message | Robert Hensing | 1 | -3/+21 | |
2022-03-03 | lib.modules: Explain why options can only be merged into submodules | Robert Hensing | 1 | -0/+9 | |
2022-03-03 | lib.modules: Refactor option scanning slightly | Robert Hensing | 1 | -10/+8 | |
This scans the options with fewer function calls, improving performance. It also removes a let Env from the happy flow of the new logic. | |||||
2022-03-03 | lib.types.submodule: Remove redundant isSubmodule attr | Robert Hensing | 1 | -1/+1 | |
2022-03-03 | lib.modules: Let module declare options directly in bare submodule | Robert Hensing | 1 | -1/+21 | |
... 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 | |||||
2022-03-01 | lib.modules: Use types.optionType for _module.freeformType | Silvan Mosberger | 1 | -2/+1 | |
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` | |||||
2022-02-22 | lib/modules: Use types.raw for _module.args | Silvan Mosberger | 1 | -1/+1 | |
Fixes https://github.com/NixOS/nixpkgs/issues/53458, as types.raw doesn't allow setting multiple values | |||||
2022-01-27 | lib/modules: introduce setDefaultModuleLocation | Naïm Favier | 1 | -5/+7 | |
Wraps a module with a default location for reporting errors. | |||||
2021-12-28 | lib/modules: extract multiply-used value in byName | pennae | 1 | -4/+4 | |
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). | |||||
2021-12-25 | lib/modules: optimize byName | pennae | 1 | -6/+5 | |
the foldl is equivalent to a zip with concat. list concatenation in nix is an O(n) operation, which makes this operation extremely inefficient when large numbers of modules are involved. this change reduces the number of list elements by 7 million on the system used to write this, total memory spent on lists by 58MB, and total memory allocated on the GC heap by almost 100MB (with a similar reduction in GC heap size). it's also slightly faster. | |||||
2021-12-17 | Merge pull request #148785 from pennae/more-option-doc-staticizing | Graham Christensen | 1 | -0/+2 | |
treewide: more defaultText for options | |||||
2021-12-08 | nixos/modules: Allow options to be coerced to a string for convenience | Silvan Mosberger | 1 | -0/+2 | |
2021-12-07 | Merge pull request #144022 from hercules-ci/lib-modules-optimize-unmatchedDefns | Silvan Mosberger | 1 | -13/+18 | |
lib/modules: Short-circuit unmatchedDefns when configs is empty | |||||
2021-12-02 | lib/modules: Deprecate args and check | Robert Hensing | 1 | -1/+6 | |
2021-12-02 | lib/modules: Pass legacy args argument along through extendModules | Robert Hensing | 1 | -4/+21 | |
2021-11-22 | modules: Add moduleType to module arguments | Robert Hensing | 1 | -0/+3 | |
2021-11-22 | modules: Document that extendModules is also a module argument | Robert Hensing | 1 | -0/+2 | |