Transmission: Difference between revisions
imported>Dywedir m Update link |
imported>Jmarmstrong1207 Modify service configuration section to be easier to understand for newer users. Remove section about losing settings at relaunch, because I believe that has been fixed. It works on my machine |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{expansion}} | {{expansion}} | ||
== Installation == | |||
Install by adding transmission_4-qt or transmission_4-gtk to your packages list | |||
<syntaxHighlight lang=nix> | |||
environment.systemPackages = with pkgs; [ transmission_4-qt ]; | |||
</syntaxHighlight> | |||
<syntaxHighlight lang=nix> | |||
environment.systemPackages = with pkgs; [ transmission_4-gtk ]; | |||
</syntaxHighlight> | |||
If you want to configure the settings declaratively with within configuration.nix, you will have to instead install transmission-qt or transmission-gtk. Do note that this is using version 3.0.0 instead of version 4. | |||
<syntaxHighlight lang=nix> | |||
environment.systemPackages = with pkgs; [ transmission-qt ]; | |||
</syntaxHighlight> | |||
<syntaxHighlight lang=nix> | |||
environment.systemPackages = with pkgs; [ transmission-gtk ]; | |||
</syntaxHighlight> | |||
== Service configuration == | == Service configuration == | ||
You can declaratively change the settings via Nix by modifying <code>services.transmission.settings</code>. [https://search.nixos.org/options?channel=23.11&from=0&size=50&sort=relevance&type=packages&query=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: | |||
<syntaxHighlight lang=nix> | |||
services.transmission.settings = { | |||
download-dir = "${config.services.transmission.home}/Downloads"; | |||
}; | |||
</syntaxHighlight> | |||
</ | |||
=== Password-protected RPC === | === 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. | 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 <code>/etc/nixos/configuration.nix</code>: | |||
<syntaxhighlight lang=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) | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
[[Category: Applications]] |
Latest revision as of 00:06, 28 February 2024
Installation
Install by adding transmission_4-qt or transmission_4-gtk to your packages list
environment.systemPackages = with pkgs; [ transmission_4-qt ];
environment.systemPackages = with pkgs; [ transmission_4-gtk ];
If you want to configure the settings declaratively with within configuration.nix, you will have to instead install transmission-qt or transmission-gtk. Do note that this is using version 3.0.0 instead of version 4.
environment.systemPackages = with pkgs; [ transmission-qt ];
environment.systemPackages = with pkgs; [ transmission-gtk ];
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)
};
};