Skip to content

Commit 7ba6fe0

Browse files
authored
Merge pull request #119 from iynaix/niri-fix-mkTagged
modules/niri: fix mkTagged for multiple key values
2 parents f77698e + 620233c commit 7ba6fe0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

modules/niri/module.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,12 @@ let
6565
else
6666
mkKeyVal n v
6767
) a;
68-
mkTagged =
69-
t: k: v:
70-
"${t} ${k}=${toVal v}";
68+
mkTagged = tag: attrs: "${tag} ${lib.concatMapAttrsStringSep " " (k: v: "${k}=${toVal v}") attrs}";
7169
mkRule =
7270
block: r:
7371
let
74-
matches = map (lib.concatMapAttrsStringSep "\n" (mkTagged "match")) r.matches or [ ];
75-
excludes = map (lib.concatMapAttrsStringSep "\n" (mkTagged "exclude")) r.excludes or [ ];
72+
matches = map (mkTagged "match") r.matches or [ ];
73+
excludes = map (mkTagged "exclude") r.excludes or [ ];
7674
misc = attrsToKdl (
7775
lib.attrsets.removeAttrs r [
7876
"matches"

0 commit comments

Comments
 (0)