diff --git a/modules/services/yabai/default.nix b/modules/services/yabai/default.nix index 9318ff9e..dd539fc1 100644 --- a/modules/services/yabai/default.nix +++ b/modules/services/yabai/default.nix @@ -14,7 +14,7 @@ let (if (cfg.config != {}) then "${toYabaiConfig cfg.config}" else "") - + optionalString (cfg.extraConfig != "") cfg.extraConfig)}"; + + optionalString (cfg.extraConfig != "") ("\n" + cfg.extraConfig + "\n"))}"; in { diff --git a/tests/services-yabai.nix b/tests/services-yabai.nix index 876ba387..48f369c4 100644 --- a/tests/services-yabai.nix +++ b/tests/services-yabai.nix @@ -23,5 +23,6 @@ in echo >&2 "checking config in $conf" grep "yabai -m config focus_follows_mouse autoraise" $conf grep "yabai -m rule --add app='System Preferences' manage=off" $conf + if [ `cat $conf | wc -l` -eq "2" ]; then echo "yabairc correctly contains 2 lines"; else return 1; fi ''; }