freun-dev: add uptime kuma
This commit is contained in:
@@ -188,5 +188,13 @@ in
|
||||
SMTP_PORT = smtp.port;
|
||||
};
|
||||
};
|
||||
|
||||
uptime-kuma = {
|
||||
enable = true;
|
||||
subdomain = "status";
|
||||
settings = {
|
||||
PORT = "3007";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,5 +20,6 @@
|
||||
./octodns.nix
|
||||
./adguardhome.nix
|
||||
./mealie.nix
|
||||
./uptime-kuma.nix
|
||||
];
|
||||
}
|
||||
|
||||
16
modules/services/uptime-kuma.nix
Normal file
16
modules/services/uptime-kuma.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.services.uptime-kuma;
|
||||
fqdn = "${cfg.subdomain}.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
options.services.uptime-kuma = {
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.webserver.vHosts.${fqdn}.locations."/".proxyPort = lib.toInt cfg.settings.PORT;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user