Rtorrent: Difference between revisions
initial creation with sample code for rtorrent + flood |
m add note about how to use and import the config |
||
Line 2: | Line 2: | ||
=== Integration with flood-js via UNIX sockets === | === Integration with flood-js via UNIX sockets === | ||
rtorrent can open a socket which other software can use to interface with. No unprotected RPC socket of rtorrent is required with this setup and it therefore provides a higher security standard<syntaxhighlight lang="nix"> | rtorrent can open a socket which other software can use to interface with. No unprotected RPC socket of rtorrent is required with this setup and it therefore provides a higher security standard. | ||
<syntaxhighlight lang="nix"> | |||
{ config, lib, pkgs, ... }: | { config, lib, pkgs, ... }: | ||
Line 16: | Line 18: | ||
openFirewall = true; | openFirewall = true; | ||
}; | }; | ||
services.flood = { | services.flood = { | ||
enable = true; | enable = true; | ||
Line 26: | Line 29: | ||
systemd.services.flood.serviceConfig.SupplementaryGroups = [ config.services.rtorrent.group ]; | systemd.services.flood.serviceConfig.SupplementaryGroups = [ config.services.rtorrent.group ]; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight>Sample configuration is to be put into '''rtorrent.nix''' and imported in your '''configuration.nix''' via: | ||
{ | |||
imports = [ ./rtorrent.nix ]; | |||
} |