diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2020-01-12 14:19:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 14:19:04 +0100 |
commit | 9884cb3ed004984696a64915849afe175ac5c597 (patch) | |
tree | 6a6b40e2d3abaa9d552f6d3fdffebd07f3bfbeb4 /nixos/doc | |
parent | a23a985594bf7c3eb543bdaf1e7a9c5b6ddd6099 (diff) | |
parent | 9d4b59b54949f0849ab9db9d30bc4cce7a205787 (diff) | |
download | nixlib-9884cb3ed004984696a64915849afe175ac5c597.tar nixlib-9884cb3ed004984696a64915849afe175ac5c597.tar.gz nixlib-9884cb3ed004984696a64915849afe175ac5c597.tar.bz2 nixlib-9884cb3ed004984696a64915849afe175ac5c597.tar.lz nixlib-9884cb3ed004984696a64915849afe175ac5c597.tar.xz nixlib-9884cb3ed004984696a64915849afe175ac5c597.tar.zst nixlib-9884cb3ed004984696a64915849afe175ac5c597.zip |
Merge pull request #76861 from Infinisil/paths-as-submodules
lib/types: Allow paths as submodule values
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/development/option-types.xml | 6 | ||||
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2003.xml | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml index 55d9c123e3f1..957349ad1811 100644 --- a/nixos/doc/manual/development/option-types.xml +++ b/nixos/doc/manual/development/option-types.xml @@ -257,9 +257,9 @@ <listitem> <para> A set of sub options <replaceable>o</replaceable>. - <replaceable>o</replaceable> 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 + <replaceable>o</replaceable> 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 <literal>types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }</literal>. Submodules are detailed in <xref diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index ca319dfea411..51f91268eff0 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -391,6 +391,16 @@ users.users.me = <link xlink:href="https://github.com/NixOS/nixpkgs/pull/63103">PR #63103</link>. </para> </listitem> + <listitem> + <para> + For NixOS modules, the types <literal>types.submodule</literal> and <literal>types.submoduleWith</literal> now support + paths as allowed values, similar to how <literal>imports</literal> supports paths. + Because of this, if you have a module that defines an option of type + <literal>either (submodule ...) path</literal>, it will break since a path + is now treated as the first type instead of the second. To fix this, change + the type to <literal>either path (submodule ...)</literal>. + </para> + </listitem> </itemizedlist> </section> |