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