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

@@ -1,20 +1,44 @@
{ config, lib, pkgs, ... }:
{
options.selfprivacy.modules.nextcloud = with lib; {
enable = mkOption {
type = types.bool;
enable = (lib.mkOption {
default = false;
type = lib.types.bool;
description = "Enable Nextcloud";
}) // {
meta = {
type = "enable";
};
};
location = mkOption {
type = types.str;
location = (lib.mkOption {
type = lib.types.str;
description = "Nextcloud location";
}) // {
meta = {
type = "location";
};
};
subdomain = lib.mkOption {
subdomain = (lib.mkOption {
default = "cloud";
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;
};
};
enableImagemagick = lib.mkOption {
enableImagemagick = (lib.mkOption {
type = types.bool;
default = true;
description = "Enable ImageMagick";
}) // {
meta = {
type = "bool";
weight = 1;
};
};
};