Go back
This commit is contained in:
parent
6a442e2e4a
commit
cf612ec457
|
@ -6,7 +6,7 @@ let
|
||||||
port = 8417;
|
port = 8417;
|
||||||
dataDir = "/persist/data/media";
|
dataDir = "/persist/data/media";
|
||||||
configDir = "/persist/state/var/lib/qbittorrent";
|
configDir = "/persist/state/var/lib/qbittorrent";
|
||||||
vpnConfig = "/persist/state/var/lib/mullvad/wireguard/ch-zrh-wg-001.conf";
|
vpnConfigDir = "/persist/state/var/lib/openvpn";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../../common/optional/services/nginx.nix ];
|
imports = [ ../../common/optional/services/nginx.nix ];
|
||||||
|
@ -21,8 +21,8 @@ in
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.qbittorrent = {
|
virtualisation.oci-containers.containers.qbittorrent = {
|
||||||
image = "linuxserver/qbittorrent:latest";
|
image = "linuxserver/qbittorrent:latest";
|
||||||
extraOptions = [ "--network=container:wireguard-client" ];
|
extraOptions = [ "--network=container:openvpn-client" ];
|
||||||
dependsOn = [ "wireguard-client" ];
|
dependsOn = [ "openvpn-client" ];
|
||||||
volumes = [ "${dataDir}:/downloads" "${configDir}:/config" ];
|
volumes = [ "${dataDir}:/downloads" "${configDir}:/config" ];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
@ -30,16 +30,16 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# {{{ wireguard-client
|
# {{{ open-vpn
|
||||||
virtualisation.oci-containers.containers.wireguard-client = {
|
virtualisation.oci-containers.containers.openvpn-client = {
|
||||||
image = "ghcr.io/wfg/wireguard";
|
image = "ghcr.io/wfg/openvpn-client";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=bridge"
|
"--network=bridge"
|
||||||
"--cap-add=net_admin"
|
"--cap-add=net_admin"
|
||||||
"--device=/dev/net/tun"
|
"--device=/dev/net/tun"
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [ "${vpnConfig}:/etc/wireguard/wg0.conf" ];
|
volumes = [ "${vpnConfigDir}:/data/vpn" ];
|
||||||
ports = [ "${toString port}:${toString port}" ];
|
ports = [ "${toString port}:${toString port}" ];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
|
Loading…
Reference in a new issue