Transmission
Installation
Transmission can be installed either with graphical front-ends or as a service (daemon). The latter caters more towards headless setups.
Graphical Front-ends
Either of the following packages can provide a graphical front-end for transmission:
transmission_4-gtk
transmission_4-qt
You may also choose to use the deprecated version 3.0.0 packages:
transmission_3-gtk
transmission_3-qt
Install by adding one of the aforementioned packages to your packages list, for example:
environment.systemPackages = with pkgs; [ transmission_4-qt ];
Daemon
The transmission daemon can be enabled declaratively as a systemd
service in the configuration.nix
file.
services.transmission.enable = true;
Note that the service defaults to using version 3.0.0 but you can use version 4 by explicitly setting the package
services.transmission = {
enable = true;
package = pkgs.transmission_4;
}
Service configuration
You can declaratively change the settings via Nix by modifying services.transmission.settings
. View the documentation for more info. Like the previous section has said before, you'll have to use the nixpkgs transmission-gtk or transmission-qt for this to work.
Example:
services.transmission.settings = {
download-dir = "${config.services.transmission.home}/Downloads";
};
Password-protected RPC
The default method of editing the configuration and restarting the daemon will not work because of the way the configuration is handled. It is however possible to once set it in clear in the settings, and then copy the generated hash to the setting, removing the in-clear copy from the configuration.
Example: allow remote access
To control the daemon remotely, put the following lines in your /etc/nixos/configuration.nix
:
services.transmission = {
enable = true; #Enable transmission daemon
openRPCPort = true; #Open firewall for RPC
settings = { #Override default settings
rpc-bind-address = "0.0.0.0"; #Bind to own IP
rpc-whitelist = "127.0.0.1,10.0.0.1"; #Whitelist your remote machine (10.0.0.1 in this example)
};
};