Personal-use NixOS configuration

Prevent rtorrent from killing internet

+10 -5
+10 -5
packages/server/sharing/rtorrent.nix
··· 21 21 package = pkgs-unstable.rtorrent; 22 22 23 23 configText = '' 24 - # Disabled due to a bug in rtorrent 0.16 25 - dht.mode.set = off 24 + dht.mode.set = on 26 25 dht.port.set = ${toString dhtPort} 27 26 protocol.pex.set = yes 28 27 trackers.use_udp.set = yes 29 28 network.port_range.set = ${toString listenPortRange.from}-${toString listenPortRange.to} 30 29 31 - throttle.max_downloads.set = 100 32 30 throttle.max_uploads.global.set = 300 33 31 34 32 trackers.numwant.set = 100 ··· 40 38 # Assumes a more powerful machine 41 39 pieces.memory.max.set = 4000M 42 40 pieces.preload.type.set = 2 43 - pieces.preload.min_rate.set = 50000 41 + pieces.preload.min_rate.set = 30720 44 42 45 43 # TODO: seeding ratio for sonarr/etc. 46 44 #ratio.enable= ··· 48 46 #ratio.max.set=300 49 47 #system.method.set = group.seeding.ratio.command, d.close= 50 48 51 - schedule2 = throttle_slow, 10:00:00, 24:00:00, ((throttle.global_up.max_rate.set_kb, 4000)) 49 + # Don't kill the internet 50 + schedule2 = throttle_download_limit_slow, 8:00:00, 24:00:00, ((throttle.max_downloads.global.set, 50)) 51 + schedule2 = throttle_download_slow, 8:00:00, 24:00:00, ((throttle.global_down.max_rate.set_kb, 10240)) 52 + schedule2 = throttle_upload_slow, 8:00:00, 24:00:00, ((throttle.global_up.max_rate.set_kb, 4096)) 53 + 54 + schedule2 = throttle_download_limit_fast, 22:00:00, 24:00:00, ((throttle.max_downloads.global.set, 200)) 55 + schedule2 = throttle_download_fast, 22:00:00, 24:00:00, ((throttle.global_down.max_rate.set_kb, 0)) 56 + schedule2 = throttle_upload_fast, 22:00:00, 24:00:00, ((throttle.global_up.max_rate.set_kb, 0)) 52 57 53 58 # Compatibility with Flood 54 59 method.redirect = load.throw,load.normal