rtorrent downloads, but doesn't upload yet
This commit is contained in:
parent
36f1b046bb
commit
aed18e9a93
5 changed files with 86 additions and 5 deletions
|
|
@ -1,16 +1,34 @@
|
|||
{ pkgs, finalDir, downloadDir, watchDir }:
|
||||
let
|
||||
dhtPort = 40000;
|
||||
in
|
||||
{
|
||||
|
||||
environment.systemPackages = with pkgs; [ rtorrent ];
|
||||
|
||||
users.extraUsers.rtorrent.extraGroups = [ "users" ];
|
||||
|
||||
services.rtorrent = {
|
||||
enable = true;
|
||||
downloadDir = downloadDir;
|
||||
group = "users";
|
||||
# flood needs to be able to access the datadir
|
||||
dataDir = downloadDir;
|
||||
configText =
|
||||
builtins.readFile (pkgs.substituteAll {
|
||||
src = ./rtorrent.rc;
|
||||
watchDir = watchDir;
|
||||
finalDir = finalDir;
|
||||
dhtPort = builtins.toString dhtPort;
|
||||
});
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
# rtorrent default
|
||||
50000
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
dhtPort
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue