mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-16 22:11:07 +01:00
nushell: create generator helpers
This commit is contained in:
parent
994a0baf7b
commit
edf15f1549
3 changed files with 89 additions and 0 deletions
|
|
@ -107,4 +107,27 @@ in rec {
|
|||
mergeDefaultOption loc defs;
|
||||
};
|
||||
|
||||
nushellValue = let
|
||||
valueType = types.nullOr (types.oneOf [
|
||||
(lib.mkOptionType {
|
||||
name = "nushell";
|
||||
description = "Nushell inline value";
|
||||
descriptionClass = "name";
|
||||
check = lib.isType "nushell-inline";
|
||||
})
|
||||
types.bool
|
||||
types.int
|
||||
types.float
|
||||
types.str
|
||||
types.path
|
||||
(types.attrsOf valueType // {
|
||||
description = "attribute set of Nushell values";
|
||||
descriptionClass = "name";
|
||||
})
|
||||
(types.listOf valueType // {
|
||||
description = "list of Nushell values";
|
||||
descriptionClass = "name";
|
||||
})
|
||||
]);
|
||||
in valueType;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue