2024-08-16 12:15:42 -04:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
delugeBase = {
|
|
|
|
image = "binhex/arch-deluge";
|
|
|
|
environment = {
|
|
|
|
PUID = "600";
|
|
|
|
PGID = "100";
|
|
|
|
TZ = "America/New_York";
|
|
|
|
UMASK = "000";
|
|
|
|
DEBUG = "false";
|
|
|
|
DELUGE_DAEMON_LOG_LEVEL = "debug";
|
|
|
|
DELUGE_WEB_LOG_LEVEL = "debug";
|
|
|
|
|
|
|
|
};
|
|
|
|
extraOptions = [ "--restart=unless-stopped" ];
|
|
|
|
};
|
2024-08-17 21:49:31 -04:00
|
|
|
|
|
|
|
vars = import ../vars.nix;
|
|
|
|
docker_path = vars.primary_docker;
|
|
|
|
torr_path = vars.primary_torr;
|
2024-08-16 12:15:42 -04:00
|
|
|
in
|
|
|
|
{
|
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
deluge = delugeBase // {
|
|
|
|
volumes = [
|
2024-08-17 21:49:31 -04:00
|
|
|
"${docker_path}/Qbit:/config"
|
|
|
|
"${torr_path}/Qbit/:/data"
|
2024-08-16 12:15:42 -04:00
|
|
|
"/etc/localtime:/etc/localtime:ro"
|
|
|
|
];
|
|
|
|
ports = [
|
|
|
|
"8082:8112"
|
|
|
|
"29432:29432"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
delugeVPN = delugeBase // {
|
|
|
|
extraOptions = [
|
|
|
|
"--restart=unless-stopped"
|
|
|
|
"--privileged=true"
|
|
|
|
"--sysctl"
|
|
|
|
"net.ipv4.conf.all.src_valid_mark=1"
|
|
|
|
];
|
|
|
|
environment = delugeBase.environment // {
|
|
|
|
VPN_ENABLED = "yes";
|
|
|
|
VPN_CLIENT = "wireguard";
|
|
|
|
VPN_PROV = "custom";
|
|
|
|
ENABLE_PRIVOXY = "yes";
|
|
|
|
LAN_NETWORK = "192.168.0.0/16";
|
|
|
|
NAME_SERVERS = "9.9.9.9,1.1.1.1,8.8.8.8,8.8.4.4";
|
|
|
|
# note, delete /config/perms.txt to force a bulk permissions update
|
|
|
|
|
|
|
|
};
|
|
|
|
volumes = [
|
2024-08-17 21:49:31 -04:00
|
|
|
"${docker_path}/QbitVPN:/config"
|
|
|
|
"${torr_path}/QbitVPN/:/data"
|
2024-08-16 12:15:42 -04:00
|
|
|
"/etc/localtime:/etc/localtime:ro"
|
|
|
|
];
|
|
|
|
ports = [
|
|
|
|
"8081:8112"
|
|
|
|
"8118:8118"
|
|
|
|
"39274:39274"
|
|
|
|
"39274:39274/udp"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
sops.secrets = {
|
|
|
|
"docker/deluge" = {
|
|
|
|
owner = "docker-service";
|
2024-08-17 21:49:31 -04:00
|
|
|
path = "${docker_path}/QbitVPN/wireguard/wg0.conf";
|
2024-08-16 12:15:42 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|