From 20f303754a767fde3a2cc445df6c2a33db28aca7 Mon Sep 17 00:00:00 2001 From: Kruemmelspalter Date: Thu, 24 Sep 2026 10:03:34 +0200 Subject: [PATCH] modules/niri: escape kdl strings properly --- modules/niri/module.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/niri/module.nix b/modules/niri/module.nix index 55927e0..f636172 100644 --- a/modules/niri/module.nix +++ b/modules/niri/module.nix @@ -34,13 +34,10 @@ let # surround strings with quotes toVal = let - escape = lib.escape [ - "\n" - "\\" - "\r" - "\t" - "\"" - ]; + escape = + builtins.replaceStrings + [ ''"'' "/" ''\'' "\n" "\r" "\t" ] + [ ''\"'' ''\/'' ''\\'' ''\n'' ''\r'' ''\t'' ]; in v: if lib.isString v then