37 lines
906 B
Nix
37 lines
906 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
service_configs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
(lib.serviceMountWithZpool "radarr" service_configs.zpool_ssds [
|
|
service_configs.radarr.dataDir
|
|
])
|
|
(lib.serviceMountWithZpool "radarr" service_configs.zpool_hdds [
|
|
service_configs.torrents_path
|
|
])
|
|
(lib.serviceFilePerms "radarr" [
|
|
"Z ${service_configs.radarr.dataDir} 0700 ${config.services.radarr.user} ${config.services.radarr.group}"
|
|
])
|
|
(lib.mkCaddyReverseProxy {
|
|
subdomain = "radarr";
|
|
port = service_configs.ports.private.radarr.port;
|
|
auth = true;
|
|
})
|
|
];
|
|
|
|
services.radarr = {
|
|
enable = true;
|
|
dataDir = service_configs.radarr.dataDir;
|
|
settings.server.port = service_configs.ports.private.radarr.port;
|
|
settings.update.mechanism = "external";
|
|
};
|
|
|
|
users.users.${config.services.radarr.user}.extraGroups = [
|
|
service_configs.media_group
|
|
];
|
|
}
|