add some docs for rtorrent; add qbittorrent as another option
This commit is contained in:
parent
07392d8c65
commit
6c8af27e05
4 changed files with 38 additions and 3 deletions
21
nix/home/programs/qbittorrent/default.nix
Normal file
21
nix/home/programs/qbittorrent/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [ qbittorrent-nox ];
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
packages = [ pkgs.qbittorrent-nox ];
|
||||||
|
|
||||||
|
services."qbittorrent-nox@fc" = {
|
||||||
|
enable = true;
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "rtorrent";
|
||||||
|
ExecStart = "${pkgs.qbittorrent-nox}/bin/qbittorrent-nox";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{ pkgs, finalDir, downloadDir, watchDir }:
|
{ pkgs, finalDir, downloadDir, watchDir }:
|
||||||
let
|
let
|
||||||
dhtPort = 40000;
|
# this needs to be configured in mullvad's settings
|
||||||
|
dhtPort = 55358;
|
||||||
|
rtorrentPort = 54945;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -10,6 +12,8 @@ in
|
||||||
|
|
||||||
services.rtorrent = {
|
services.rtorrent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
port = rtorrentPort;
|
||||||
|
openFirewall = true;
|
||||||
downloadDir = downloadDir;
|
downloadDir = downloadDir;
|
||||||
# flood needs to be able to access the datadir
|
# flood needs to be able to access the datadir
|
||||||
dataDir = downloadDir;
|
dataDir = downloadDir;
|
||||||
|
|
@ -24,11 +28,11 @@ in
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
# rtorrent default
|
dhtPort
|
||||||
50000
|
|
||||||
];
|
];
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
dhtPort
|
dhtPort
|
||||||
|
rtorrentPort
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,15 @@ trackers.use_udp.set = 1
|
||||||
dht.mode.set = auto
|
dht.mode.set = auto
|
||||||
dht.port.set = @dhtPort@
|
dht.port.set = @dhtPort@
|
||||||
|
|
||||||
|
throttle.max_uploads.set = 100
|
||||||
|
throttle.max_uploads.global.set = 250
|
||||||
|
|
||||||
|
throttle.min_peers.normal.set = 1
|
||||||
|
throttle.max_peers.normal.set = 1024
|
||||||
|
throttle.min_peers.seed.set = 1
|
||||||
|
throttle.max_peers.seed.set = 1024
|
||||||
|
trackers.numwant.set = 80
|
||||||
|
|
||||||
# Adding public DHT servers for easy bootstrapping
|
# Adding public DHT servers for easy bootstrapping
|
||||||
schedule2 = dht_node_1, 5, 0, "dht.add_node=router.utorrent.com:6881"
|
schedule2 = dht_node_1, 5, 0, "dht.add_node=router.utorrent.com:6881"
|
||||||
schedule2 = dht_node_2, 5, 0, "dht.add_node=dht.transmissionbt.com:6881"
|
schedule2 = dht_node_2, 5, 0, "dht.add_node=dht.transmissionbt.com:6881"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
finalDir = "/storage";
|
finalDir = "/storage";
|
||||||
watchDir = "/storage/torrents";
|
watchDir = "/storage/torrents";
|
||||||
})
|
})
|
||||||
|
(import ../../home/programs/qbittorrent { pkgs = pkgs; })
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue