nixos/qbittorrent: escape newlines in config values

This commit is contained in:
K900
2025-11-23 23:33:32 +03:00
parent ba01df3d3d
commit dfaf57caa0
@@ -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
)
)