os/hosts/flora-6/caddy.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
861 B
Nix
Raw Permalink Normal View History

2022-11-27 23:31:08 +01:00
{
2023-01-28 23:51:33 +01:00
config,
lib,
pkgs,
self,
...
}:
{
systemd.tmpfiles.rules = [
"d '/data/srv/www/os/download/' 0750 hakkonaut hakkonaut - -"
];
2022-11-27 23:31:08 +01:00
services.caddy = {
enable = lib.mkForce true;
group = "hakkonaut";
2022-11-27 23:31:08 +01:00
email = "admins@pub.solar";
enableReload = true;
globalConfig = lib.mkForce ''
grace_period 60s
'';
2022-11-27 23:31:08 +01:00
virtualHosts = {
2023-01-28 21:26:13 +01:00
"ci.pub.solar" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
reverse_proxy :4000
'';
};
"obs-portal.pub.solar" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
reverse_proxy obs-portal.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.int.greenbaum.zone:3000
'';
};
2022-11-27 23:31:08 +01:00
};
};
2023-01-28 23:51:33 +01:00
networking.firewall.allowedTCPPorts = [80 443];
2022-11-27 23:31:08 +01:00
}