nixpkgs/lib/tests/modules
Robert Hensing 118bdf25a6 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).
2023-03-01 15:03:44 +01:00
..
disable-recursive lib/tests: Add tests for recursive disabledModules 2020-01-09 17:26:08 +01:00
functionTo lib/tests/modules: Test functionTo submodule merging too 2022-05-13 09:09:16 +02:00
types-anything lib/types: Make types.anything merge functions 2021-10-02 16:37:22 +02:00
adhoc-freeformType-survives-type-merge.nix lib.types.optionType: Only merge when necessary 2022-03-10 20:25:49 +01:00
alias-with-priority-can-override.nix Fix the documentation for the tests to reflect what is actually happening. 2019-02-07 10:33:48 +09:00
alias-with-priority.nix Fix the documentation for the tests to reflect what is actually happening. 2019-02-07 10:33:48 +09:00
attrsOf-conditional-check.nix lib/tests: Add tests for attrsOf and lazyAttrsOf 2020-01-10 16:20:31 +01:00
attrsOf-lazy-check.nix lib/tests: Add tests for attrsOf and lazyAttrsOf 2020-01-10 16:20:31 +01:00
declare-attrsOf.nix lib/tests/modules: Test non-strictness some more 2021-11-03 19:19:41 +01:00
declare-attrsOfSub-any-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
declare-bare-submodule-deep-option-duplicate.nix lib/tests/modules: Add test case for duplicate option error file location 2022-03-07 11:21:23 +01:00
declare-bare-submodule-deep-option.nix lib.modules: Let module declare options directly in bare submodule 2022-03-03 00:28:35 +01:00
declare-bare-submodule-nested-option.nix lib.modules: Make option injection work when shorthandOnlyDefinesConfig 2022-03-03 00:29:14 +01:00
declare-bare-submodule.nix lib.modules: Make option injection work when shorthandOnlyDefinesConfig 2022-03-03 00:29:14 +01:00
declare-coerced-value-unsound.nix lib/types: Add coercedTo unsound tests 2018-05-06 23:58:36 +02:00
declare-coerced-value.nix
declare-either.nix lib/types: Add oneOf, extension of either to a list of types 2019-08-06 14:08:42 +02:00
declare-enable-nested.nix lib/tests: Check for nested option-dependent definitions 2020-03-19 03:50:47 +01:00
declare-enable.nix
declare-int-between-value.nix lib/types: update docs to match the new type names 2017-11-05 15:56:32 +01:00
declare-int-positive-value-nested.nix lib/tests: Check for nested option-dependent definitions 2020-03-19 03:50:47 +01:00
declare-int-positive-value.nix lib/types: add ints.positive. 2017-11-05 15:56:32 +01:00
declare-int-unsigned-value.nix lib/types: update docs to match the new type names 2017-11-05 15:56:32 +01:00
declare-lazyAttrsOf.nix lib/tests: Add tests for attrsOf and lazyAttrsOf 2020-01-10 16:20:31 +01:00
declare-oneOf.nix lib/types: Add oneOf, extension of either to a list of types 2019-08-06 14:08:42 +02:00
declare-set.nix lib.modules: Improve option-is-prefix error message 2022-03-03 00:29:11 +01:00
declare-submodule-via-evalModules.nix lib.evalModules: Add extendModules and type to result 2021-11-01 09:34:07 +01:00
declare-submoduleWith-modules.nix lib/tests: Make sure the submodule type description can be evaluated 2021-05-03 22:15:33 +02:00
declare-submoduleWith-noshorthand.nix lib/tests: Add submoduleWith tests 2020-01-02 09:59:35 +01:00
declare-submoduleWith-path.nix lib/tests: Add submoduleWith tests 2020-01-02 09:59:35 +01:00
declare-submoduleWith-shorthand.nix lib/tests: Add submoduleWith tests 2020-01-02 09:59:35 +01:00
declare-submoduleWith-special.nix lib/tests: Add submoduleWith tests 2020-01-02 09:59:35 +01:00
declare-variants.nix modules: Add moduleType to module arguments 2021-11-22 16:50:50 +01:00
default.nix
deferred-module-error.nix lib/modules: Throw earlier when module function does not return attrs 2022-06-14 23:23:41 +02:00
deferred-module.nix lib.deferredModule: Make it properly singular 2022-06-14 23:01:27 +02:00
define-_module-args-custom.nix
define-attrsOfSub-bar-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-bar.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-foo-enable-force.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-foo-enable-if.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-foo-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-foo-force-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-foo-if-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-foo.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-force-foo-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-attrsOfSub-if-foo-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-bare-submodule-values.nix lib.modules: Let module declare options directly in bare submodule 2022-03-03 00:28:35 +01:00
define-enable-abort.nix lib/modules: Add context to the "option does not exist" error 2022-12-02 11:06:53 +00:00
define-enable-force.nix
define-enable-throw.nix lib/modules: Add context to the "option does not exist" error 2022-12-02 11:06:53 +00:00
define-enable-with-custom-arg.nix
define-enable.nix
define-force-attrsOfSub-foo-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-force-enable.nix
define-if-attrsOfSub-foo-enable.nix lib/tests: remove strictly loaOf tests and rebase on attrsOf 2020-01-06 10:39:19 -05:00
define-module-check.nix
define-option-dependently-nested.nix lib/tests: Check for nested option-dependent definitions 2020-03-19 03:50:47 +01:00
define-option-dependently.nix lib/*: editorconfig fixes 2020-07-31 15:07:33 +10:00
define-settingsDict-a-is-b.nix lib.types.deferredModule: Allow path-typed module references 2022-06-14 23:01:26 +02:00
define-shorthandOnlyDefinesConfig-true.nix lib.modules: Make option injection work when shorthandOnlyDefinesConfig 2022-03-03 00:29:14 +01:00
define-submoduleWith-noshorthand.nix lib/tests: Add submoduleWith tests 2020-01-02 09:59:35 +01:00
define-submoduleWith-shorthand.nix lib/tests: Add submoduleWith tests 2020-01-02 09:59:35 +01:00
define-value-int-negative.nix lib/types: update docs to match the new type names 2017-11-05 15:56:32 +01:00
define-value-int-positive.nix lib/types: update docs to match the new type names 2017-11-05 15:56:32 +01:00
define-value-int-zero.nix lib/types: add ints.positive. 2017-11-05 15:56:32 +01:00
define-value-list.nix
define-value-string-arbitrary.nix lib/types: Add coercedTo unsound tests 2018-05-06 23:58:36 +02:00
define-value-string-bigint.nix lib/types: Add coercedTo unsound tests 2018-05-06 23:58:36 +02:00
define-value-string-properties.nix lib/tests: Add tests for freeform modules 2020-08-03 22:37:01 +02:00
define-value-string.nix
define-variant.nix modules: Add moduleType to module arguments 2021-11-22 16:50:50 +01:00
disable-declare-enable.nix
disable-define-enable-string-path.nix lib.modules: support strings with absolute paths in disabledModules 2022-08-31 14:23:28 +02:00
disable-define-enable.nix
disable-enable-modules.nix
disable-module-bad-key.nix lib/modules: Allow an "anonymous" module with key in disabledModules 2023-03-01 15:03:44 +01:00
disable-module-with-key.nix lib/modules: Allow an "anonymous" module with key in disabledModules 2023-03-01 15:03:44 +01:00
disable-module-with-toString-key.nix lib/modules: Allow an "anonymous" module with key in disabledModules 2023-03-01 15:03:44 +01:00
doRename-basic.nix lib/tests/modules: Test doRename 2022-11-03 13:12:58 +01:00
doRename-warnings.nix lib/tests/modules: Test doRename 2022-11-03 13:12:58 +01:00
emptyValues.nix lib/tests: Add tests for emptyValue 2022-02-17 18:48:30 +01:00
extendModules-168767-imports.nix lib.types.submoduleWith: Avoid _key collisions after extendModules 2022-04-24 00:07:59 +02:00
freeform-attrsOf.nix lib/modules: Add syntactic sugar for config._module.freeformType 2020-08-14 22:49:04 +02:00
freeform-lazyAttrsOf.nix lib/modules: Add syntactic sugar for config._module.freeformType 2020-08-14 22:49:04 +02:00
freeform-nested.nix lib/tests/modules: Test non-strictness some more 2021-11-03 19:19:41 +01:00
freeform-str-dep-unstr.nix lib/tests: Add tests for freeform modules 2020-08-03 22:37:01 +02:00
freeform-submodules.nix lib.modules: Use types.optionType for _module.freeformType 2022-03-01 19:31:02 +01:00
freeform-unstr-dep-str.nix lib/tests: Add tests for freeform modules 2020-08-03 22:37:01 +02:00
import-custom-arg.nix
import-from-store.nix lib/tests: Fix module tests 2020-01-10 16:02:36 +01:00
merge-module-with-key.nix lib/modules: Allow an "anonymous" module with key in disabledModules 2023-03-01 15:03:44 +01:00
optionTypeFile.nix lib.types: Introduce types.optionType 2022-03-01 19:31:00 +01:00
optionTypeMerging.nix lib.types: Introduce types.optionType 2022-03-01 19:31:00 +01:00
raw.nix lib/types: Introduce types.raw for unprocessed values 2022-02-22 15:54:44 +01:00
shorthand-meta.nix lib/modules: Fix meta duplication in shorthand syntax 2022-09-21 10:55:11 +01:00
submoduleFiles.nix lib/tests: Add submodule file propagation test 2022-06-14 17:01:58 +02:00