servarr: added radarr
This commit is contained in:
parent
b25d36a626
commit
07feb5d83d
|
@ -27,7 +27,7 @@ in
|
|||
type = types.bool;
|
||||
default = config.profile.podman.servarr.enable;
|
||||
};
|
||||
radar.enable = mkOption {
|
||||
radarr.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = config.profile.podman.servarr.enable;
|
||||
};
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
./sonarr.nix
|
||||
./prowlarr.nix
|
||||
./bazarr.nix
|
||||
./radarr.nix
|
||||
];
|
||||
}
|
||||
|
|
50
system/podman/servarr/radarr.nix
Normal file
50
system/podman/servarr/radarr.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
podman = config.profile.podman;
|
||||
name = "radarr";
|
||||
radarr = podman.servarr.${name};
|
||||
ip = "10.88.2.7";
|
||||
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 && radarr.enable) {
|
||||
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
||||
reverse_proxy ${ip}:7878
|
||||
'';
|
||||
|
||||
system.activationScripts."podman-${name}" = ''
|
||||
mkdir -p ${configVolume} ${mediaVolume}
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue