Compare commits
2 Commits
5b4d3bca76
...
b62198e7a0
Author | SHA1 | Date | |
---|---|---|---|
b62198e7a0 | |||
0f62e84479 |
@ -15,6 +15,7 @@
|
|||||||
./public.nix
|
./public.nix
|
||||||
./radicale.nix
|
./radicale.nix
|
||||||
./reichartstrasse.nix
|
./reichartstrasse.nix
|
||||||
|
./uptimestatus.nix
|
||||||
./wetter.nix
|
./wetter.nix
|
||||||
./znc.nix
|
./znc.nix
|
||||||
];
|
];
|
||||||
|
37
hosts/web-2/uptimestatus.nix
Normal file
37
hosts/web-2/uptimestatus.nix
Normal 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/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -64,7 +64,7 @@ in {
|
|||||||
WETTER_SETTINGS = "${configFile}";
|
WETTER_SETTINGS = "${configFile}";
|
||||||
};
|
};
|
||||||
script = "gunicorn -w 4 -b [::1]:8234 wetter:app";
|
script = "gunicorn -w 4 -b [::1]:8234 wetter:app";
|
||||||
path = with pkgs; [ (python38.withPackages (ps: [ ps.gunicorn wetter ])) ];
|
path = with pkgs; [ (python3.withPackages (ps: [ ps.gunicorn wetter ])) ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
|
Loading…
Reference in New Issue
Block a user