From 6525da6321a7272faa0c2b1c15ffd3501888e9b9 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 3 Jan 2020 05:22:11 +0100 Subject: [PATCH] lib/types: Allow paths as submodule values --- lib/tests/modules.sh | 3 +-- lib/types.nix | 8 +++++--- nixos/doc/manual/development/option-types.xml | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index f69befd15c64..65b482ec194d 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -174,8 +174,7 @@ checkConfigOutput "true" config.submodule.inner ./declare-submoduleWith-modules. checkConfigOutput "true" config.submodule.outer ./declare-submoduleWith-modules.nix ## Paths should be allowed as values and work as expected -# Temporarily disabled until https://github.com/NixOS/nixpkgs/pull/76861 -#checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix +checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix cat < A set of sub options o. - o can be an attribute set or a function - returning an attribute set. Submodules are used in composed types to - create modular options. This is equivalent to + o can be an attribute set, a function + returning an attribute set, or a path to a file containing such a value. Submodules are used in + composed types to create modular options. This is equivalent to types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }. Submodules are detailed in