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,28 +7,64 @@ let
in
{
options.selfprivacy.modules.bitwarden = {
enable = lib.mkOption {
enable = (lib.mkOption {
default = false;
type = lib.types.bool;
description = "Enable Vaultwarden";
}) // {
meta = {
type = "enable";
};
};
location = lib.mkOption {
location = (lib.mkOption {
type = lib.types.str;
description = "Vaultwarden location";
}) // {
meta = {
type = "location";
};
};
subdomain = lib.mkOption {
subdomain = (lib.mkOption {
default = "password";
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;
};
};
signupsAllowed = lib.mkOption {
signupsAllowed = (lib.mkOption {
default = true;
type = lib.types.bool;
description = "Allow new user signups";
}) // {
meta = {
type = "bool";
weight = 1;
};
};
sendsAllowed = lib.mkOption {
sendsAllowed = (lib.mkOption {
default = true;
type = lib.types.bool;
description = "Allow users to use Bitwarden Send";
}) // {
meta = {
type = "bool";
weight = 2;
};
};
emergencyAccessAllowed = lib.mkOption {
emergencyAccessAllowed = (lib.mkOption {
default = true;
type = lib.types.bool;
description = "Allow users to enable Emergency Access";
}) // {
meta = {
type = "bool";
weight = 3;
};
};
};