-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #295 from barrucadu/transmission
Switch from rtorrent+flood to transmission
- Loading branch information
Showing
10 changed files
with
168 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ in | |
./pleroma | ||
./resolved | ||
./restic-backups | ||
./rtorrent | ||
./torrents | ||
./umami | ||
]; | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# [Transmission][] is a bittorrent client. This module configures it along with | ||
# a web UI. | ||
# | ||
# This module does not include a backup script. Torrented files must be backed | ||
# up independently. | ||
# | ||
# **Erase your darlings:** transparently stores session data on the persistent | ||
# volume. | ||
# | ||
# [Transmission]: https://transmissionbt.com/ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
let | ||
cfg = config.nixfiles.torrents; | ||
in | ||
{ | ||
imports = [ | ||
./erase-your-darlings.nix | ||
./options.nix | ||
]; | ||
|
||
config = mkIf cfg.enable { | ||
services.transmission = { | ||
enable = true; | ||
user = cfg.user; | ||
group = cfg.group; | ||
home = "${cfg.stateDir}/transmission"; | ||
openPeerPorts = cfg.openFirewall; | ||
webHome = pkgs.flood-for-transmission; | ||
settings = { | ||
# paths | ||
download-dir = cfg.downloadDir; | ||
watch-dir = cfg.watchDir; | ||
watch-dir-enabled = true; | ||
incomplete-dir-enabled = false; | ||
|
||
# optimise for private trackers (disable DHT and PEX, force encryption) | ||
encryption = 2; | ||
dht-enabled = false; | ||
pex-enabled = false; | ||
|
||
# peers | ||
peer-port = cfg.peerPort; | ||
peer-port-random-on-start = false; | ||
|
||
# rpc | ||
rpc-bind-address = "127.0.0.1"; | ||
rpc-port = cfg.rpcPort; | ||
rpc-host-whitelist-enabled = false; | ||
|
||
# misc | ||
message-level = cfg.logLevel; | ||
rename-partial-files = false; | ||
trash-can-enabled = false; | ||
trash-original-torrent-files = false; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ config, lib, ... }: | ||
|
||
with lib; | ||
let | ||
cfg = config.nixfiles.torrents; | ||
eyd = config.nixfiles.eraseYourDarlings; | ||
in | ||
{ | ||
config = mkIf (cfg.enable && eyd.enable) { | ||
nixfiles.torrents.stateDir = "${toString eyd.persistDir}/var/lib/torrents"; | ||
}; | ||
} |
Oops, something went wrong.