nix/hosts/marvin/services/caddy.nix
2022-07-01 12:21:13 -04:00

60 lines
1.5 KiB
Nix

{
lib,
pkgs,
config,
...
}: {
services.caddy = {
enable = true;
email = "hedgehog@mrhedgehog.xyz";
globalConfig = ''
http_port 81
acme_ca_root /run/agenix/step-root-ca-crt-caddy
'';
acmeCA = "https://ca.thehedgehog.internal:8420/acme/acme/directory";
virtualHosts = {
"reddit.thehedgehog.internal" = {
serverAliases = [ "reddit" ];
extraConfig = ''
reverse_proxy http://localhost:4000
'';
};
"adguard.thehedgehog.internal" = {
serverAliases = [ "adguard" "dns" ];
extraConfig = ''
reverse_proxy http://localhost:2500
'';
};
"rss.thehedgehog.internal" = {
serverAliases = [ "rss" "miniflux" ];
extraConfig = ''
reverse_proxy http://localhost:6000
'';
};
"jellyfin.thehedgehog.internal" = {
serverAliases = [ "jellyfin" "media" ];
extraConfig = ''
reverse_proxy http://localhost:8096
'';
};
"hydra.thehedgehog.internal" = {
serverAliases = [ "hydra" "ci" ];
extraConfig = ''
reverse_proxy http://localhost:3000
'';
};
"dav.thehedgehog.internal" = {
serverAliases = [ "dav" "radicale" ];
extraConfig = ''
reverse_proxy http://localhost:5352
'';
};
"rss-bridge.thehedgehog.internal" = {
serverAliases = [ "rssbridge" "rss-bridge" ];
extraConfig = ''
reverse_proxy http://localhost:80
'';
};
};
};
}