1
0
Fork 0
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:
Joaquín Triñanes 2024-09-14 02:15:02 +02:00 committed by Robert Helgesson
parent 994a0baf7b
commit edf15f1549
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
3 changed files with 89 additions and 0 deletions

View file

@ -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;
}