huge change

This commit is contained in:
fwastring 2025-11-12 10:12:29 +01:00
parent c159d2f3e3
commit d86cc3c816
29 changed files with 1151 additions and 792 deletions

View file

@ -0,0 +1,57 @@
{
lib,
pkgs,
config,
...
}:
with lib;
{
options = {
gotify = {
enable = mkEnableOption "enables gotify";
port = lib.mkOption {
type = lib.types.int;
default = 8857;
description = "The port gotify listens on.";
};
host = mkOption {
type = types.str;
defaultText = literalExpression "127.0.0.1";
description = "The hostname that gotify binds to";
};
domain = mkOption {
type = types.str;
defaultText = literalExpression "home.wastring.com";
description = "The hostname that gotify binds to";
};
};
};
config = mkMerge [
(mkIf config.gotify.enable {
sops.secrets.gotify_password = { };
services.gotify = {
enable = true;
environmentFiles = [
config.sops.secrets.gotify_password.path
];
environment = {
GOTIFY_DATABASE_DIALECT = "sqlite3";
GOTIFY_SERVER_PORT = config.gotify.port;
GOTIFY_DEFAULTUSER_NAME = "admin";
};
};
services.nginx.virtualHosts.${config.gotify.domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://${toString config.gotify.host}:${toString config.gotify.port}";
proxyWebsockets = true;
};
};
})
];
}

View file

@ -0,0 +1,47 @@
{
lib,
pkgs,
config,
...
}:
with lib;
{
options = {
kanboard = {
enable = mkEnableOption "enables kanboard";
port = lib.mkOption {
type = lib.types.int;
default = 3128;
description = "The port kanboard listens on.";
};
host = mkOption {
type = types.str;
defaultText = literalExpression "127.0.0.1";
description = "The hostname that kanboard binds to";
};
domain = mkOption {
type = types.str;
defaultText = literalExpression "home.wastring.com";
description = "The hostname that kanboard binds to";
};
};
};
config = mkMerge [
(mkIf config.kanboard.enable {
services.kanboard = {
enable = true;
domain = config.kanboard.domain;
nginx = null;
};
services.nginx.virtualHosts.${config.kanboard.domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://${toString config.kanboard.host}:${toString config.kanboard.port}";
proxyWebsockets = true;
};
};
})
];
}