Home: Replace deluge with transmission.
This commit is contained in:
parent
445b10976b
commit
d76c7aba1e
15
home/program/bash/module/Transmission.sh
Normal file
15
home/program/bash/module/Transmission.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Torrent download alias.
|
||||||
|
function tdl() {
|
||||||
|
transmission-remote home.local ${@}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Download torrent files to home.
|
||||||
|
# Usage: tdla <FILES>
|
||||||
|
function tdla() {
|
||||||
|
tdl -a "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# List download torrents.
|
||||||
|
function tdll() {
|
||||||
|
transmission-remote home.local -l
|
||||||
|
}
|
|
@ -6,7 +6,6 @@ let
|
||||||
(mkBind "change" "/var/lib/changedetection-io")
|
(mkBind "change" "/var/lib/changedetection-io")
|
||||||
(mkBind "cups" "/var/lib/cups")
|
(mkBind "cups" "/var/lib/cups")
|
||||||
(mkBind "davis" "/var/lib/davis")
|
(mkBind "davis" "/var/lib/davis")
|
||||||
(mkBind "deluge" "/var/lib/deluge/.config/deluge")
|
|
||||||
(mkBind "dkim" "/var/dkim")
|
(mkBind "dkim" "/var/dkim")
|
||||||
(mkBind "dovecot_index" "/var/lib/dovecot/indices")
|
(mkBind "dovecot_index" "/var/lib/dovecot/indices")
|
||||||
(mkBind "forgejo" "/var/lib/forgejo")
|
(mkBind "forgejo" "/var/lib/forgejo")
|
||||||
|
@ -24,6 +23,7 @@ let
|
||||||
(mkBind "sieve" "/var/sieve")
|
(mkBind "sieve" "/var/sieve")
|
||||||
(mkBind "tandoor" "/var/lib/tandoor-recipes")
|
(mkBind "tandoor" "/var/lib/tandoor-recipes")
|
||||||
(mkBind "terraria" "/var/lib/terraria")
|
(mkBind "terraria" "/var/lib/terraria")
|
||||||
|
(mkBind "transmission" "/var/lib/transmission")
|
||||||
(mkBind "uptime_kuma" "/var/lib/uptime-kuma")
|
(mkBind "uptime_kuma" "/var/lib/uptime-kuma")
|
||||||
(mkBind "vaultwarden" "/var/lib/vaultwarden")
|
(mkBind "vaultwarden" "/var/lib/vaultwarden")
|
||||||
(mkBind "vmail" "/var/vmail")
|
(mkBind "vmail" "/var/vmail")
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
services.deluge = {
|
|
||||||
enable = true;
|
|
||||||
web.enable = true;
|
|
||||||
};
|
|
||||||
systemd.services.deluged.serviceConfig = {
|
|
||||||
MemoryMax = "4G";
|
|
||||||
Restart = lib.mkForce "always";
|
|
||||||
RuntimeMaxSec = "3h";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -161,10 +161,8 @@ in
|
||||||
ip46tables -I INPUT -j ACCEPT -i ${wan} -p tcp --dport 443
|
ip46tables -I INPUT -j ACCEPT -i ${wan} -p tcp --dport 443
|
||||||
|
|
||||||
# Deluge torrenting ports.
|
# Deluge torrenting ports.
|
||||||
ip46tables -I INPUT -j ACCEPT -i ${wan} -p tcp --dport 54630
|
ip46tables -I INPUT -j ACCEPT -i ${wan} -p tcp --dport 51413
|
||||||
ip46tables -I INPUT -j ACCEPT -i ${wan} -p udp --dport 54630
|
ip46tables -I INPUT -j ACCEPT -i ${wan} -p udp --dport 51413
|
||||||
ip46tables -I INPUT -j ACCEPT -i ${wan} -p tcp --dport 54631
|
|
||||||
ip46tables -I INPUT -j ACCEPT -i ${wan} -p udp --dport 54631
|
|
||||||
|
|
||||||
# Terraria server.
|
# Terraria server.
|
||||||
ip46tables -I INPUT -j ACCEPT -i ${wan} -p tcp --dport 22777
|
ip46tables -I INPUT -j ACCEPT -i ${wan} -p tcp --dport 22777
|
||||||
|
|
45
host/x86_64-linux/home/Transmission.nix
Normal file
45
host/x86_64-linux/home/Transmission.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.transmission = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.transmission_4;
|
||||||
|
# REF: https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md
|
||||||
|
settings = let
|
||||||
|
downloadDir = "/storage/hot/download";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
bind-address-ipv4 = "0.0.0.0";
|
||||||
|
bind-address-ipv6 = "::";
|
||||||
|
cache-size-mb = 4;
|
||||||
|
dht-enabled = true;
|
||||||
|
download-dir = downloadDir;
|
||||||
|
download-queue-enabled = true;
|
||||||
|
download-queue-size = 10;
|
||||||
|
encryption = 1;
|
||||||
|
incomplete-dir-enabled = false;
|
||||||
|
message-level = 3;
|
||||||
|
peer-limit-global = 500;
|
||||||
|
peer-limit-per-torrent = 50;
|
||||||
|
peer-port = 51413;
|
||||||
|
pex-enabled = true;
|
||||||
|
port-forwarding-enabled = false;
|
||||||
|
preallocation = 1;
|
||||||
|
preferred-transport = "utp";
|
||||||
|
rename-partial-files = true;
|
||||||
|
rpc-bind-address = "::";
|
||||||
|
rpc-host-whitelist-enabled = false;
|
||||||
|
rpc-password = "";
|
||||||
|
rpc-port = 9091;
|
||||||
|
rpc-username = "root";
|
||||||
|
rpc-whitelist-enabled = false;
|
||||||
|
start-added-torrents = true;
|
||||||
|
tcp-enabled = true;
|
||||||
|
torrent-added-verify-mode = "fast";
|
||||||
|
trash-can-enabled = false;
|
||||||
|
trash-original-torrent-files = true;
|
||||||
|
umask = 22;
|
||||||
|
utp-enabled = true;
|
||||||
|
watch-dir = "/var/lib/transmission/watchdir/";
|
||||||
|
watch-dir-enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -6,7 +6,7 @@ in
|
||||||
"download.${cfg.domain}" = {
|
"download.${cfg.domain}" = {
|
||||||
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:8112$request_uri";
|
proxyPass = "http://[::1]:9091$request_uri";
|
||||||
extraConfig = cfg.allowLocal;
|
extraConfig = cfg.allowLocal;
|
||||||
};
|
};
|
||||||
};
|
};
|
|
@ -102,6 +102,7 @@
|
||||||
swappy # Screenshot editing.
|
swappy # Screenshot editing.
|
||||||
sway # Sway WM.
|
sway # Sway WM.
|
||||||
swaykbdd # Keyboard layout per-window.
|
swaykbdd # Keyboard layout per-window.
|
||||||
|
transmission_4 # Torrent client.
|
||||||
waybar # Sway bar.
|
waybar # Sway bar.
|
||||||
wf-recorder # Screen recording.
|
wf-recorder # Screen recording.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue