servarr: added rdtclient
This commit is contained in:
parent
a772664b8e
commit
7997bca8f0
|
@ -43,6 +43,10 @@ in
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = config.profile.podman.servarr.enable;
|
default = config.profile.podman.servarr.enable;
|
||||||
};
|
};
|
||||||
|
rdtclient.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = config.profile.podman.servarr.enable;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
qbittorrent.enable = true;
|
qbittorrent.enable = true;
|
||||||
servarr.enable = true;
|
servarr.enable = true;
|
||||||
servarr.recyclarr.enable = false;
|
servarr.recyclarr.enable = false;
|
||||||
|
servarr.real-debrid-manager.enable = false;
|
||||||
|
servarr.rdtclient.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
docker = {
|
docker = {
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# ./real-debrid-manager.nix
|
./real-debrid-manager.nix
|
||||||
./qbittorrent.nix
|
./qbittorrent.nix
|
||||||
./sonarr.nix
|
./sonarr.nix
|
||||||
./prowlarr.nix
|
./prowlarr.nix
|
||||||
./bazarr.nix
|
./bazarr.nix
|
||||||
./radarr.nix
|
./radarr.nix
|
||||||
|
./rdtclient.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
51
system/podman/servarr/rdtclient.nix
Normal file
51
system/podman/servarr/rdtclient.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
podman = config.profile.podman;
|
||||||
|
name = "rdtclient";
|
||||||
|
cfg = podman.servarr.${name};
|
||||||
|
ip = "10.88.2.1";
|
||||||
|
image = "docker.io/rogerfar/rdtclient:latest";
|
||||||
|
root = "/nas/mediaserver/servarr";
|
||||||
|
volumeConfig = "${root}/${name}";
|
||||||
|
mediaVolume = "${root}/data/torrents";
|
||||||
|
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 && cfg.enable) {
|
||||||
|
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
||||||
|
reverse_proxy ${ip}:6500
|
||||||
|
'';
|
||||||
|
|
||||||
|
system.activationScripts."podman-${name}" = ''
|
||||||
|
mkdir -p ${volumeConfig} ${mediaVolume}
|
||||||
|
chown ${uid}:${gid} ${volumeConfig} ${mediaVolume}
|
||||||
|
'';
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers.${name} = {
|
||||||
|
inherit image;
|
||||||
|
hostname = name;
|
||||||
|
autoStart = true;
|
||||||
|
# user = "${uid}:${gid}";
|
||||||
|
environment = {
|
||||||
|
TZ = "Asia/Jakarta";
|
||||||
|
PUID = uid;
|
||||||
|
PGID = gid;
|
||||||
|
};
|
||||||
|
volumes = [
|
||||||
|
"${volumeConfig}:/data/db"
|
||||||
|
"${mediaVolume}:/data/torrents"
|
||||||
|
];
|
||||||
|
extraOptions = [
|
||||||
|
"--network=podman"
|
||||||
|
"--ip=${ip}"
|
||||||
|
];
|
||||||
|
labels = {
|
||||||
|
"io.containers.autoupdate" = "registry";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,26 +1,29 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
podman = config.profile.podman;
|
podman = config.profile.podman;
|
||||||
cfg = podman.servarr.real-debrid-manager;
|
|
||||||
name = "real-debrid-manager";
|
name = "real-debrid-manager";
|
||||||
ip = "10.88.2.1";
|
real-debrid-manager = podman.servarr.${name};
|
||||||
image = "docker.io/hyperbunny77/realdebridmanager:latest";
|
ip = "10.88.2.99";
|
||||||
volume = "/nas/mediaserver/servarr/real-debrid-manager";
|
image = "docker.io/hyperbunny77/realdebridmanager:2022.06.27";
|
||||||
domain = "rdm.tigor.web.id";
|
root = "/nas/mediaserver/servarr";
|
||||||
|
configVolume = "${root}/real-debrid-manager";
|
||||||
|
mediaVolume = "${root}/data/torrents";
|
||||||
|
watchVolume = "${mediaVolume}/watch";
|
||||||
|
domain = "${name}.tigor.web.id";
|
||||||
user = config.profile.user;
|
user = config.profile.user;
|
||||||
uid = toString user.uid;
|
uid = toString user.uid;
|
||||||
gid = toString user.gid;
|
gid = toString user.gid;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf (podman.enable && cfg.enable) {
|
config = mkIf (podman.enable && real-debrid-manager.enable) {
|
||||||
services.caddy.${domain}.extraConfig = ''
|
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
||||||
reverse_proxy ${ip}:5000
|
reverse_proxy ${ip}:5000
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.activationScripts."podman-${name}" = ''
|
system.activationScripts."podman-${name}" = ''
|
||||||
mkdir -p ${volume}/{config,downloads,watch}
|
mkdir -p ${configVolume} ${mediaVolume} ${watchVolume}
|
||||||
chown -R ${uid}:${gid} ${volume}/{config,downloads,watch}
|
chown ${uid}:${gid} ${configVolume} ${mediaVolume} ${watchVolume}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.${name} = {
|
virtualisation.oci-containers.containers.${name} = {
|
||||||
|
@ -28,14 +31,14 @@ in
|
||||||
hostname = name;
|
hostname = name;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
user = "${uid}:${gid}";
|
user = "${uid}:${gid}";
|
||||||
enviroment = {
|
environment = {
|
||||||
TZ = "Asia/Jakarta";
|
TZ = "Asia/Jakarta";
|
||||||
rdmport = "5000";
|
rdmport = "5000";
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"${volume}/config:/config"
|
"${configVolume}:/config"
|
||||||
"${volume}/downloads:/downloads"
|
"${mediaVolume}:/data/torrents"
|
||||||
"${volume}/watch:/watch"
|
"${watchVolume}:/watch"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=podman"
|
"--network=podman"
|
||||||
|
|
Loading…
Reference in a new issue