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

@@ -5,5 +5,25 @@
nixosModules.default = import ./module.nix;
configPathsNeeded =
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
meta = { lib, ... }: {
spModuleVersion = 1;
id = "roundcube";
name = "Roundcube";
description = "Roundcube is an open source webmail software.";
svgIcon = builtins.readFile ./icon.svg;
isMovable = false;
isRequired = false;
canBeBackedUp = false;
backupDescription = "Nothing to backup.";
systemdServices = [
"phpfpm-roundcube.service"
];
license = [
lib.licenses.gpl3
];
homepage = "https://roundcube.net/";
sourcePage = "https://github.com/roundcube/roundcubemail";
supportLevel = "normal";
};
};
}

View File

@@ -0,0 +1,5 @@
<svg fill="none" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(29.07 -.3244)">
<path d="m-17.02 2.705c-4.01 2e-7 -7.283 3.273-7.283 7.283 0 0.00524-1.1e-5 0.01038 0 0.01562l-1.85 1.068v5.613l9.105 5.26 9.104-5.26v-5.613l-1.797-1.037c1.008e-4 -0.01573 0.00195-0.03112 0.00195-0.04688-1e-7 -4.01-3.271-7.283-7.281-7.283zm0 2.012c2.923 1e-7 5.27 2.349 5.27 5.271 0 2.923-2.347 5.27-5.27 5.27-2.923-1e-6 -5.271-2.347-5.271-5.27 0-2.923 2.349-5.271 5.271-5.271z" fill="#000" fill-rule="evenodd" stroke-linejoin="bevel"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 592 B

View File

@@ -5,13 +5,26 @@ let
in
{
options.selfprivacy.modules.roundcube = {
enable = lib.mkOption {
enable = (lib.mkOption {
default = false;
type = lib.types.bool;
description = "Enable";
}) // {
meta = {
type = "enable";
};
};
subdomain = lib.mkOption {
subdomain = (lib.mkOption {
default = "roundcube";
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;
};
};
};