Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ rec {
, specialArgs ? {}
, shorthandOnlyDefinesConfig ? false
, description ? null
, nameArgument ? "name"
}@attrs:
let
inherit (lib.modules) evalModules;
Expand Down Expand Up @@ -724,7 +725,7 @@ rec {
# > and < wouldn't be encoded correctly so the encoded values
# would be used, and use of `<` and `>` would break the XML document.
# It shouldn't cause an issue since this is cosmetic for the manual.
_module.args.name = lib.mkOptionDefault "‹name›";
_module.args.${nameArgument} = lib.mkOptionDefault "‹name›";
}] ++ modules;
};

Expand All @@ -741,7 +742,7 @@ rec {
check = x: isAttrs x || isFunction x || path.check x;
merge = loc: defs:
(base.extendModules {
modules = [ { _module.args.name = last loc; } ] ++ allModules defs;
modules = [ { _module.args.${nameArgument} = last loc; } ] ++ allModules defs;
prefix = loc;
}).config;
emptyValue = { value = {}; };
Expand Down