add uptime-kuma to public01

This commit is contained in:
Kiara Grouwstra 2024-09-28 22:14:42 +02:00
parent 1f05410770
commit cdfe405e96
2 changed files with 58 additions and 44 deletions

View file

@ -9,6 +9,11 @@
# TODO: make it the default
networking.domain = "infra.forkos.org";
bagel.uptime-kuma = {
enable = true;
domain = "status.forkos.org";
};
bagel.sysadmin.enable = true;
# Newsletter is proxied.
bagel.raito.v6-proxy-awareness.enable = true;

View file

@ -5,6 +5,7 @@
...
}:
let
cfg = config.bagel.uptime-kuma;
subdomains = [
"cl"
"netbox"
@ -25,19 +26,26 @@ let
# "postgres"
# "news"
];
host = "status.forkos.org";
port = 3001;
in
{
imports = [ "${inputs.stateless-uptime-kuma}/nixos/module.nix" ];
options.bagel.uptime-kuma = {
enable = lib.mkEnableOption "the status page service (uptime-kuma)";
domain = lib.mkOption {
type = lib.types.str;
};
};
config = lib.mkIf cfg.enable {
nixpkgs.overlays = [ (import "${inputs.stateless-uptime-kuma}/overlay.nix") ];
services.uptime-kuma.enable = true;
services.nginx = {
enable = true;
virtualHosts.${host} = {
virtualHosts.${cfg.domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
@ -82,4 +90,5 @@ in
passwordFile = config.age.secrets."stateless-uptime-kuma-password".path;
enableService = true;
};
};
}