1
0
Fork 0

Make status page public availiable

This commit is contained in:
clerie 2021-12-07 19:09:50 +01:00
parent 5b4d3bca76
commit 0f62e84479
2 changed files with 38 additions and 0 deletions

View File

@ -15,6 +15,7 @@
./public.nix
./radicale.nix
./reichartstrasse.nix
./uptimestatus.nix
./wetter.nix
./znc.nix
];

View File

@ -0,0 +1,37 @@
{ pkgs, ... }:
{
users.users.uptimestatus = {
description = "Uptime Status Service";
group = "uptimestatus";
home = "/var/lib/uptimestatus/";
useDefaultShell = true;
isSystemUser = true;
};
users.groups.uptimestatus = {};
systemd.services.uptimestatus = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
RuntimeDirectory = "uptimestatus";
StateDirectory = "uptimestatus";
User = "uptimestatus";
Group = "uptimestatus";
};
environment = {
UPTIMESTATUS_SETTINGS = pkgs.writeText "wetter.cfg" ''
PROMETHEUS_API_BASE="https://prometheus.monitoring.clerie.de"
'';
};
script = "gunicorn -w 4 -b [::1]:8236 uptimestatus:app";
path = with pkgs; [ (python3.withPackages (ps: [ ps.gunicorn uptimestatus ])) ];
};
services.nginx.virtualHosts = {
"status.clerie.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://[::1]:8236/";
};
};
}