docs: add initial docs setup

This commit is contained in:
technofab 2025-09-02 11:00:38 +02:00
parent aa1abf945e
commit e7f7043012
No known key found for this signature in database
7 changed files with 101 additions and 5 deletions

View file

@ -2,7 +2,7 @@
pkgs,
lib,
} @ args: let
inherit (lib) types isAttrs filterAttrs mapAttrs mkOption mkOptionType isType;
inherit (lib) types isAttrs filterAttrs mapAttrs mkOption mkOptionType isType literalExpression;
in rec {
prepend = key: arr: job: {
${key} = arr ++ (job.${key} or []);
@ -61,12 +61,17 @@ in rec {
_type = "unset";
};
isUnset = isType "unset";
unsetOr = types.either unsetType;
unsetOr = typ:
(types.either unsetType typ)
// {
description = typ.description;
};
mkUnsetOption = opts:
mkOption (opts
// {
type = unsetOr opts.type;
default = opts.default or unset;
defaultText = literalExpression "unset";
});
filterUnset = value: