From e2cc46b37e33643cf3dd017adb8a009bf143e246 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 25 Nov 2023 18:09:05 +0300 Subject: 2023-11-25 --- modules/nixos/rtorrent.nix | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'modules/nixos/rtorrent.nix') diff --git a/modules/nixos/rtorrent.nix b/modules/nixos/rtorrent.nix index 847f12d..c39f306 100644 --- a/modules/nixos/rtorrent.nix +++ b/modules/nixos/rtorrent.nix @@ -44,27 +44,24 @@ in { sessionDir = "${baseDir}/session"; logDir = "${baseDir}/log"; configFile = let - moveCompleted = let - pkg = pkgs.writeShellApplication { - name = "move-completed"; - runtimeInputs = with pkgs; [ - coreutils-full - gnused - findutils - ]; - text = '' - set -x - - leech_path="$1" - seed_path="$2" - # seed_path="$(echo "$2" | sed 's@+@ @g;s@%@\\x@g' | xargs -0 printf '%b')" - - mkdir -pv "$seed_path" - mv -fv "$leech_path" "$seed_path" - ''; - }; - in - getExe pkg; + moveCompleted = getExe (pkgs.writeShellApplication { + name = "move-completed"; + runtimeInputs = with pkgs; [ + coreutils-full + gnused + findutils + ]; + text = '' + set -x + + leech_path="$1" + seed_path="$2" + # seed_path="$(echo "$2" | sed 's@+@ @g;s@%@\\x@g' | xargs -0 printf '%b')" + + mkdir -pv "$seed_path" + mv -fv "$leech_path" "$seed_path" + ''; + }); in pkgs.writeText "rtorrent.rc" '' method.insert = cfg.leech, private|const|string, (cat, "${leechDir}") -- cgit 1.4.1