too much shit idek anymore

This commit is contained in:
blahai 2025-01-26 00:36:34 +02:00
parent 14843ef945
commit bc82345beb
No known key found for this signature in database
63 changed files with 1759 additions and 346 deletions

View file

@ -0,0 +1,31 @@
{
lib,
config,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.services) mkServiceOption;
rdomain = config.networking.domain;
cfg = config.olympus.services.uptime-kuma;
in {
options.olympus.services.uptime-kuma = mkServiceOption "uptime-kuma" {
port = 3001;
domain = "kuma.${rdomain}";
};
config = mkIf cfg.enable {
services.uptime-kuma = {
enable = true;
# https://github.com/louislam/uptime-kuma/wiki/Environment-Variables
settings.PORT = toString cfg.port;
};
services.caddy.virtualHosts.${cfg.domain} = {
extraConfig = ''
reverse_proxy localhost:${cfg.port}
'';
};
};
}