refactor: remove duplication

This commit is contained in:
FUFSoB committed 2026-09-18 21:39:18 +05:00
1 parent f7036f6075
commit 8a4ba2db6a
109 files changed
+2206 -3078

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
# The option shapes this module declares over and over, in one place.
{ lib }:
let
inherit (lib) mkOption types;
in
{
list =
description: example:
mkOption {
type = types.listOf types.str;
default = [ ];
inherit description example;
};
nullStr =
description: example:
mkOption {
type = types.nullOr types.str;
default = null;
inherit description example;
};
bool =
default: description:
mkOption {
type = types.bool;
inherit default description;
};
int =
default: description:
mkOption {
type = types.int;
inherit default description;
};
positiveInt =
default: description:
mkOption {
type = types.ints.positive;
inherit default description;
};
# An option path under services.proxy-suite, for the compatibility modules.
path =
path:
[
"services"
"proxy-suite"
]
++ lib.splitString "." path;
}