phase 2: promote services/, tests/, patches/, lib/, scripts/
This commit is contained in:
34
services/arr/bazarr.nix
Normal file
34
services/arr/bazarr.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
service_configs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(lib.serviceMountWithZpool "bazarr" service_configs.zpool_ssds [
|
||||
service_configs.bazarr.dataDir
|
||||
])
|
||||
(lib.serviceMountWithZpool "bazarr" service_configs.zpool_hdds [
|
||||
service_configs.torrents_path
|
||||
])
|
||||
(lib.serviceFilePerms "bazarr" [
|
||||
"Z ${service_configs.bazarr.dataDir} 0700 ${config.services.bazarr.user} ${config.services.bazarr.group}"
|
||||
])
|
||||
(lib.mkCaddyReverseProxy {
|
||||
subdomain = "bazarr";
|
||||
port = service_configs.ports.private.bazarr.port;
|
||||
auth = true;
|
||||
})
|
||||
];
|
||||
|
||||
services.bazarr = {
|
||||
enable = true;
|
||||
listenPort = service_configs.ports.private.bazarr.port;
|
||||
};
|
||||
|
||||
users.users.${config.services.bazarr.user}.extraGroups = [
|
||||
service_configs.media_group
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user