1
0
Fork 0

Services: Allow multiple countries for QBT's VPN

This commit is contained in:
Aires 2024-10-03 20:31:51 -04:00
parent 46d534c1c1
commit 55a59f4006
2 changed files with 10 additions and 1 deletions

View file

@ -231,6 +231,10 @@ in
vpn = {
enable = true;
privateKey = config.secrets.services.protonvpn.privateKey;
countries = [
"Norway"
"Netherlands"
];
};
};
ssh = {

View file

@ -46,6 +46,11 @@ in
type = lib.types.str;
description = "Wireguard private key.";
};
countries = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of countries to base the VPN out of.";
default = [ "Netherlands" ];
};
};
};
};
@ -97,7 +102,7 @@ in
VPN_SERVICE_PROVIDER = "protonvpn";
VPN_TYPE = "wireguard";
WIREGUARD_PRIVATE_KEY = config.secrets.services.protonvpn.privateKey;
SERVER_COUNTRIES = "Netherlands";
SERVER_COUNTRIES = (lib.strings.concatStringsSep "," cfg.vpn.countries);
TZ = "America/New_York";
};
ports = [ "${cfg.port}:${cfg.port}" ];