From ba5dd5ef5cae7b773f2f0dca27acebfaa2f79c20 Mon Sep 17 00:00:00 2001 From: 0xTux <0xtux@pm.me> Date: Mon, 12 Aug 2024 17:25:48 +0530 Subject: [PATCH] add aria2 --- hosts/common/home.nix | 1 + modules/home-manager/aria2/default.nix | 44 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 modules/home-manager/aria2/default.nix diff --git a/hosts/common/home.nix b/hosts/common/home.nix index 48ee34d..d0712ac 100644 --- a/hosts/common/home.nix +++ b/hosts/common/home.nix @@ -10,6 +10,7 @@ ../../modules/home-manager/nvim ../../modules/home-manager/tmux ../../modules/home-manager/helix + ../../modules/home-manager/aria2 ]; nixpkgs = { diff --git a/modules/home-manager/aria2/default.nix b/modules/home-manager/aria2/default.nix new file mode 100644 index 0000000..752dd96 --- /dev/null +++ b/modules/home-manager/aria2/default.nix @@ -0,0 +1,44 @@ +{...}: { + programs.aria2 = { + enable = true; + settings = { + file-allocation = "none"; + log-level = "warn"; + max-connection-per-server = 16; + min-split-size = "1M"; + human-readable = true; + reuse-uri = true; + rpc-save-upload-metadata = true; + max-file-not-found = 0; + remote-time = true; + async-dns = true; + stop = 0; + allow-piece-length-change = true; + optimize-concurrent-downloads = true; + deferred-input = true; + continue = true; + check-integrity = true; + realtime-chunk-checksum = true; + piece-length = "1M"; + split = 16; + # Seconds: + save-session-interval = 60; + # Caches in memory + disk-cache = "32M"; + save-not-found = true; + download-result = "full"; + truncate-console-readout = true; + retry-wait = 30; + max-tries = 15; + enable-color = true; + enable-http-keep-alive = true; + enable-http-pipelining = true; + http-accept-gzip = true; + follow-torrent = true; + bt-save-metadata = true; + seed-time = 0; + bt-load-saved-metadata = true; + metalink-preferred-protocol = "https"; + }; + }; +}