bebop: Add and enable uptime kuma

This commit is contained in:
Payas Relekar 2023-09-06 15:02:15 +05:30
parent 5f2bbe57e0
commit 19940dfcc7
2 changed files with 40 additions and 0 deletions

View file

@ -84,6 +84,7 @@
./modules/hledger.nix
./modules/etesync.nix
# ./modules/photoprism.nix
./modules/uptime_kuma.nix
# Host-specific config
nixos-hardware.nixosModules.raspberry-pi-4

39
modules/uptime_kuma.nix Normal file
View file

@ -0,0 +1,39 @@
{ ... }:
{
services = {
uptime-kuma = {
enable = true;
settings = {
UPTIME_KUMA_HOST = "uptime.bhankas.org";
UPTIME_KUMA_PORT = "4000";
DATA_DIR = "/var/lib/uptime_kuma";
};
};
nginx = {
virtualHosts = {
"uptime.bhankas.org" = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:4000";
proxyWebsockets = false;
extraConfig =
"proxy_set_header Host $host;"
;
};
};
};
};
};
security.acme = {
acceptTerms = true;
certs = {
"uptime.bhankas.org" = {
email = "admin@bhankas.org";
dnsResolver = "1.1.1.1:53";
};
};
};
}