servarr: added bazarr
This commit is contained in:
parent
7ae5099bc9
commit
b25d36a626
50
system/podman/servarr/bazarr.nix
Normal file
50
system/podman/servarr/bazarr.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
podman = config.profile.podman;
|
||||
bazarr = podman.servarr.bazarr;
|
||||
name = "bazarr";
|
||||
ip = "10.88.2.6";
|
||||
image = "lscr.io/linuxserver/${name}:latest";
|
||||
root = "/nas/mediaserver/servarr";
|
||||
configVolume = "${root}/${name}";
|
||||
mediaVolume = "${root}/data";
|
||||
domain = "${name}.tigor.web.id";
|
||||
user = config.profile.user;
|
||||
uid = toString user.uid;
|
||||
gid = toString user.gid;
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
{
|
||||
config = mkIf (podman.enable && bazarr.enable) {
|
||||
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
||||
reverse_proxy ${ip}:6767
|
||||
'';
|
||||
|
||||
system.activationScripts."podman-${name}" = ''
|
||||
mkdir -p ${configVolume}
|
||||
chown ${uid}:${gid} ${mediaVolume} ${configVolume}
|
||||
'';
|
||||
|
||||
virtualisation.oci-containers.containers.${name} = {
|
||||
inherit image;
|
||||
hostname = name;
|
||||
autoStart = true;
|
||||
environment = {
|
||||
PUID = uid;
|
||||
PGID = gid;
|
||||
TZ = "Asia/Jakarta";
|
||||
};
|
||||
volumes = [
|
||||
"${configVolume}:/config"
|
||||
"${mediaVolume}:/data"
|
||||
];
|
||||
extraOptions = [
|
||||
"--ip=${ip}"
|
||||
"--network=podman"
|
||||
];
|
||||
labels = {
|
||||
"io.containers.autoupdate" = "registry";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -5,5 +5,6 @@
|
|||
./qbittorrent.nix
|
||||
./sonarr.nix
|
||||
./prowlarr.nix
|
||||
./bazarr.nix
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue