30 lines
799 B
Nix
30 lines
799 B
Nix
{
|
|
pkgs,
|
|
service_configs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
(lib.serviceMountWithZpool "prowlarr" service_configs.zpool_ssds [
|
|
service_configs.prowlarr.dataDir
|
|
])
|
|
(lib.serviceFilePerms "prowlarr" [
|
|
"Z ${service_configs.prowlarr.dataDir} 0700 prowlarr prowlarr"
|
|
])
|
|
(lib.vpnNamespaceOpenPort service_configs.ports.prowlarr "prowlarr")
|
|
];
|
|
|
|
services.prowlarr = {
|
|
enable = true;
|
|
dataDir = service_configs.prowlarr.dataDir;
|
|
settings.server.port = service_configs.ports.prowlarr;
|
|
};
|
|
|
|
services.caddy.virtualHosts."prowlarr.${service_configs.https.domain}".extraConfig = ''
|
|
import ${config.age.secrets.caddy_auth.path}
|
|
reverse_proxy ${config.vpnNamespaces.wg.namespaceAddress}:${builtins.toString service_configs.ports.prowlarr}
|
|
'';
|
|
}
|