lib: add mkCaddyReverseProxy, mkFail2banJail, mkGrafanaAnnotationService, extractArrApiKey
This commit is contained in:
@@ -8,6 +8,12 @@
|
||||
{
|
||||
imports = [
|
||||
(lib.vpnNamespaceOpenPort service_configs.ports.private.bitmagnet.port "bitmagnet")
|
||||
(lib.mkCaddyReverseProxy {
|
||||
subdomain = "bitmagnet";
|
||||
port = service_configs.ports.private.bitmagnet.port;
|
||||
auth = true;
|
||||
vpn = true;
|
||||
})
|
||||
];
|
||||
|
||||
services.bitmagnet = {
|
||||
@@ -24,8 +30,4 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."bitmagnet.${service_configs.https.domain}".extraConfig = ''
|
||||
import ${config.age.secrets.caddy_auth.path}
|
||||
reverse_proxy ${config.vpnNamespaces.wg.namespaceAddress}:${builtins.toString service_configs.ports.private.bitmagnet.port}
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user