feat: Dynamic templating

This commit is contained in:
Inex Code
2024-12-18 15:40:15 +03:00
parent 7b69b39bff
commit cca51699ee
36 changed files with 802 additions and 43 deletions

View File

@@ -7,13 +7,26 @@ let
in
{
options.selfprivacy.modules.ocserv = {
enable = lib.mkOption {
enable = (lib.mkOption {
default = false;
type = lib.types.bool;
description = "Enable";
}) // {
meta = {
type = "enable";
};
};
subdomain = lib.mkOption {
subdomain = (lib.mkOption {
default = "vpn";
type = lib.types.strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
description = "Subdomain";
}) // {
meta = {
widget = "subdomain";
type = "string";
regex = "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
weight = 0;
};
};
};