From e6ed60548397627bf10f561f9438201dbba0a36e Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 21 Apr 2024 02:15:42 +0300 Subject: 2024-04-21 --- modules/aria2.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 modules/aria2.nix (limited to 'modules/aria2.nix') diff --git a/modules/aria2.nix b/modules/aria2.nix new file mode 100644 index 0000000..cdf1c4f --- /dev/null +++ b/modules/aria2.nix @@ -0,0 +1,33 @@ +{ config, lib, ... }: +with lib; +let + cfg = config.nixfiles.modules.aria2; +in +{ + options.nixfiles.modules.aria2.enable = mkEnableOption "aria2"; + + config = mkIf cfg.enable { + hm.programs.aria2 = { + enable = true; + + settings = { + bt-max-peers = 128; + bt-save-metadata = true; + continue = true; + enable-dht = true; + enable-peer-exchange = true; + enable-rpc = false; + follow-torrent = true; + log-level = "info"; + max-connection-per-server = 16; + max-overall-upload-limit = "1K"; + max-tries = 5; + max-upload-limit = "1K"; + seed-ratio = 0.1; + seed-time = 0.1; + stream-piece-selector = "default"; + timeout = 60; + }; + }; + }; +} -- cgit v1.2.3