From dfaf57caa02bc135ee77ec978edeebed0cb22b7f Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 23 Nov 2025 23:33:32 +0300 Subject: [PATCH] nixos/qbittorrent: escape newlines in config values --- nixos/modules/services/torrent/qbittorrent.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/torrent/qbittorrent.nix b/nixos/modules/services/torrent/qbittorrent.nix index 44c710c6da6b..4bfcf309a16a 100644 --- a/nixos/modules/services/torrent/qbittorrent.nix +++ b/nixos/modules/services/torrent/qbittorrent.nix @@ -17,6 +17,7 @@ let mkIf maintainers escape + replaceString collect mapAttrsRecursive optionals @@ -43,7 +44,9 @@ let collect isString ( mapAttrsRecursive ( path: value: - "${escape [ sep ] (concatStringsSep "\\" ([ k ] ++ path))}${sep}${mkValueStringDefault { } value}" + "${escape [ sep ] (concatStringsSep "\\" ([ k ] ++ path))}${sep}${ + replaceString "\n" "\\n" (mkValueStringDefault { } value) + }" ) v ) )