nix/hosts/marvin/services/caddy.nix
2022-07-15 22:05:23 -04:00

61 lines
1.4 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" = {
extraConfig = ''
reverse_proxy http://localhost:4000
'';
};
"adguard.thehedgehog.internal" = {
extraConfig = ''
reverse_proxy http://localhost:2500
'';
};
"rss.thehedgehog.internal" = {
extraConfig = ''
reverse_proxy http://localhost:6000
'';
};
"media.thehedgehog.internal" = {
serverAliases = ["jellyfin.thehedgehog.internal"];
extraConfig = ''
reverse_proxy http://localhost:8096
'';
};
"hydra.thehedgehog.internal" = {
extraConfig = ''
reverse_proxy http://localhost:3000
'';
};
"dav.thehedgehog.internal" = {
extraConfig = ''
reverse_proxy http://localhost:5352
'';
};
"rss-bridge.thehedgehog.internal" = {
extraConfig = ''
reverse_proxy http://localhost:80
'';
};
"git.thehedgehog.internal" = {
extraConfig = ''
reverse_proxy http://localhost:3001
'';
};
};
extraConfig = ''
'';
};
}