new uptime-kuma service, new drive

This commit is contained in:
Reid 2025-06-01 17:37:53 -07:00
parent 7a9f880f6d
commit 4bf1b55911
4 changed files with 52 additions and 6 deletions

View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.modules.services.uptime;
in {
options.modules.services.uptime = {
enable = mkEnableOption "enable uptime kuma, a self-hosted uptime website";
port = mkOption {
type = types.int;
default = 3002;
};
domain = mkOption {
type = types.str;
default = "status.reidlab.pink";
};
};
config = mkIf cfg.enable {
services.uptime-kuma = {
enable = true;
settings.PORT = toString cfg.port;
};
services.nginx.virtualHosts."${cfg.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
};
};
};
}