Compare commits

..

2 commits

Author SHA1 Message Date
8492679843 allow service access from podman network 2025-05-14 01:16:35 +02:00
fbe7ea3179 enable auth for sonarr 2025-05-14 00:44:14 +02:00
2 changed files with 12 additions and 0 deletions

View file

@ -7,6 +7,17 @@ in
enable = true; enable = true;
}; };
services.caddy.virtualHosts."${domain}".extraConfig = '' services.caddy.virtualHosts."${domain}".extraConfig = ''
# for some reason this only works with http and not with https so we send every request through our wireguard tunnel
reverse_proxy /outpost.goauthentik.io/* http://nuc.vpn.rfive.de:9000
# forward authentication to authentik
@NoAccess not path /api*
forward_auth @NoAccess http://nuc.vpn.rfive.de:9000 {
uri /outpost.goauthentik.io/auth/caddy
# capitalization of the headers is important, otherwise they will be empty
copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Email X-Authentik-Name X-Authentik-Uid X-Authentik-Jwt X-Authentik-Meta-Jwks X-Authentik-Meta-Outpost X-Authentik-Meta-Provider X-Authentik-Meta-App X-Authentik-Meta-Version
}
reverse_proxy 127.0.0.1:${toString config.services.sonarr.settings.server.port} reverse_proxy 127.0.0.1:${toString config.services.sonarr.settings.server.port}
''; '';
} }

View file

@ -15,6 +15,7 @@
enableIPv6 = true; enableIPv6 = true;
nftables.enable = true; nftables.enable = true;
firewall = { firewall = {
trustedInterfaces = [ "podman0" ];
extraInputRules = '' extraInputRules = ''
ip saddr 192.168.0.0/16 tcp dport 19531 accept comment "Allow journald gateway access from local networks" ip saddr 192.168.0.0/16 tcp dport 19531 accept comment "Allow journald gateway access from local networks"
''; '';