aboutsummaryrefslogtreecommitdiff
path: root/modules/tlmp/rtorrent.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tlmp/rtorrent.nix')
-rw-r--r--modules/tlmp/rtorrent.nix69
1 files changed, 54 insertions, 15 deletions
diff --git a/modules/tlmp/rtorrent.nix b/modules/tlmp/rtorrent.nix
index bf72a2a..c374122 100644
--- a/modules/tlmp/rtorrent.nix
+++ b/modules/tlmp/rtorrent.nix
@@ -1,31 +1,69 @@
{ config, lib, pkgs, ... }:
{
+ environment.systemPackages = with pkgs; [ libnatpmp gawk dig ];
+
systemd.services = {
- wireguard-mullvad = {
- bindsTo = [ "netns@mullvad.service" ];
- after = [ "netns@mullvad.service" ];
+ # wireguard-mullvad = {
+ # bindsTo = [ "netns@torrent.service" ];
+ # after = [ "netns@torrent.service" ];
+ # };
+
+ wireguard-proton = {
+ bindsTo = [ "netns@torrent.service" ];
+ after = [ "netns@torrent.service" ];
};
rtorrent = {
- bindsTo = [ "wireguard-mullvad.service" ];
- after = [ "wireguard-mullvad.service" ];
- unitConfig.JoinsNamespaceOf = "netns@mullvad.service";
- serviceConfig.PrivateNetwork = true;
+ bindsTo = [ "wireguard-proton.service" ];
+ after = [ "wireguard-proton.service" ];
+ unitConfig.JoinsNamespaceOf = "netns@torrent.service";
+ serviceConfig = {
+ PrivateNetwork = true;
+ LimitNOFILE = 24000;
+ };
+
+ path = with pkgs; [ libnatpmp gawk dig findutils gzip ];
};
};
networking.wireguard.interfaces = {
- mullvad = { # Caring Wasp
- ips = [ "10.67.4.3/32" "fc00:bbbb:bbbb:bb01::4:402/128" ];
- privateKeyFile = "/root/wireguard/privkey";
- interfaceNamespace = "mullvad";
+ # mullvad = { # Caring Wasp
+ # ips = [ "10.67.4.3/32" "fc00:bbbb:bbbb:bb01::4:402/128" ];
+ # privateKeyFile = "/root/wireguard/privkey";
+ # interfaceNamespace = "mullvad";
+
+ # peers = [
+ # # { # de-fra-wg-006.relays.mullvad.net
+ # # publicKey = "nAF0wrLG2+avwQfqxnXhBGPUBCvc3QCqWKH4nK5PfEU=";
+ # # endpoint = "185.209.196.76:51820";
+ # # allowedIPs = [ "0.0.0.0/0" "::/0" ];
+ # # }
+ # { # de-fra-wg-008.relays.mullvad.net
+ # publicKey = "TOS3U/dJPzPnk/qsAx6gHxRVIC2wI5l+tAWaJY2mXzY=";
+ # endpoint = "185.209.196.78:51820";
+ # allowedIPs = [ "0.0.0.0/0" "::/0" ];
+ # }
+ # ];
+ # };
+ proton = { # phaenn
+ ips = [ "10.2.0.2/32" ];
+ # privateKeyFile = "/root/wireguard/proton.key";
+ privateKeyFile = "/root/wireguard/proton_ch.key";
+ interfaceNamespace = "torrent";
peers = [
- { # de-fra-wg-006.relays.mullvad.net
- publicKey = "nAF0wrLG2+avwQfqxnXhBGPUBCvc3QCqWKH4nK5PfEU=";
- endpoint = "185.209.196.76:51820";
- allowedIPs = [ "0.0.0.0/0" "::/0" ];
+ # { # DE#348
+ # publicKey = "hOoBBy//7mddXPz1SybzWB3zK95SQCcPyI/DmxfULXk=";
+ # endpoint = "149.88.102.97:51820";
+ # allowedIPs = [ "0.0.0.0/0" ];
+ # persistentKeepalive = 25;
+ # }
+ { # CH#403
+ publicKey = "R8TfZYSkUM30soIPOVpNsP35qCnnJvJJI9r/VxH5TkQ=";
+ endpoint = "146.70.226.226:51820";
+ allowedIPs = [ "0.0.0.0/0" ];
+ persistentKeepalive = 25;
}
];
};
@@ -33,6 +71,7 @@
services.rtorrent = {
enable = true;
+ package = pkgs.unstable.rtorrent;
# dataDir = "/mnt/media/download";
user = "media";
group = "media";