forked from pub-solar/os
53 lines
1.1 KiB
Nix
53 lines
1.1 KiB
Nix
{ config
|
|
, lib
|
|
, pkgs
|
|
, self
|
|
, ...
|
|
}:
|
|
{
|
|
services.caddy = {
|
|
enable = lib.mkForce true;
|
|
email = "admins@pub.solar";
|
|
globalConfig = lib.mkForce "";
|
|
virtualHosts = {
|
|
"pub.solar" = {
|
|
logFormat = lib.mkForce ''
|
|
output discard
|
|
'';
|
|
extraConfig = ''
|
|
root * /srv/www/pub.solar/
|
|
file_serve
|
|
'';
|
|
};
|
|
"auth.pub.solar" = {
|
|
logFormat = lib.mkForce ''
|
|
output discard
|
|
'';
|
|
extraConfig = ''
|
|
redir / /realms/pub.solar/account temporary
|
|
reverse_proxy :8080
|
|
'';
|
|
};
|
|
"git.pub.solar" = {
|
|
logFormat = lib.mkForce ''
|
|
output discard
|
|
'';
|
|
extraConfig = ''
|
|
redir /user/login /user/oauth2/keycloak temporary
|
|
reverse_proxy :3000
|
|
'';
|
|
};
|
|
"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
|
|
'';
|
|
};
|
|
|
|
};
|
|
};
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
}
|