Files
nixos/modules/services/uptime-kuma.nix
2025-02-17 15:31:40 +02:00

17 lines
365 B
Nix

{ 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;
};
}