This commit is contained in:
Hadi
2024-07-11 16:07:04 +02:00
parent 8412b4dd93
commit 1dc5190c43
7 changed files with 38 additions and 19 deletions

View File

@@ -1,22 +1,22 @@
# I'm using the transmission-openvpn docker image to be sure that my torrent traffic is going through a VPN.
# Only to download legal stuff of course.
{
environment.etc."/etc/transmission.sh" = {
text = ''
docker run --cap-add=NET_ADMIN -d \
-v /var/lib/transmission-openvpn/data:/data \
-v /var/lib/transmission-openvpn/config:/config \
-e OPENVPN_PROVIDER=PIA \
-e OPENVPN_CONFIG=france \
-e OPENVPN_USERNAME=username\
-e OPENVPN_PASSWORD="password" \
-e LOCAL_NETWORK=192.168.2.0/24 \
--log-driver json-file \
--log-opt max-size=10m \
-p 9091:9091 \
haugene/transmission-openvpn
'';
};
# environment.etc."/etc/transmission.sh" = {
# text = ''
# docker run --cap-add=NET_ADMIN -d \
# -v /var/lib/transmission-openvpn/data:/data \
# -v /var/lib/transmission-openvpn/config:/config \
# -e OPENVPN_PROVIDER=PIA \
# -e OPENVPN_CONFIG=france \
# -e OPENVPN_USERNAME=username\
# -e OPENVPN_PASSWORD="password" \
# -e LOCAL_NETWORK=192.168.2.0/24 \
# --log-driver json-file \
# --log-opt max-size=10m \
# -p 9091:9091 \
# haugene/transmission-openvpn
# '';
# };
# TODO: launch the container at boot
networking.firewall.allowedTCPPorts = [ 9091 ];