diff --git a/hosts/lab/default.nix b/hosts/lab/default.nix index fdc0d90..247bf04 100644 --- a/hosts/lab/default.nix +++ b/hosts/lab/default.nix @@ -8,6 +8,7 @@ ./forgejo.nix ./wynne.nix ./fail2ban.nix + ./uptime-kuma.nix ]; networking.hostName = "lab"; diff --git a/hosts/lab/uptime-kuma.nix b/hosts/lab/uptime-kuma.nix new file mode 100644 index 0000000..6d6cce8 --- /dev/null +++ b/hosts/lab/uptime-kuma.nix @@ -0,0 +1,27 @@ +{ ... }: +{ + services.caddy.virtualHosts."status.ily.rs" = { + extraConfig = '' + reverse_proxy localhost:3001 + encode zstd gzip + ''; + }; + + services.caddy.virtualHosts."status.wynne.rs" = { + extraConfig = '' + redir https://status.ily.rs{uri} permanent + ''; + }; + + virtualisation.oci-containers.containers.uptime-kuma = { + image = "louislam/uptime-kuma:1"; + podman.user = "podman"; + volumes = [ + "/srv/uptime-kuma/data:/app/data" + ]; + ports = [ "127.0.0.1:3001:3001" ]; + }; + + # Workaround for NixOS/nixpkgs#410857 until backport of #475089 lands + systemd.services.podman-uptime-kuma.serviceConfig.Delegate = true; +}