From 1f88956b959196af4de00276153fe6a88fba72bf Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Sat, 27 Jul 2024 15:28:31 +0200 Subject: [PATCH] nixos/kmscon: fix cfgfile missing trailing newline Currently, the `kmscon.conf` file that is generated is missing a trailing newline. This breaks `kmscon`, since its parser assumes well-formedness. I noticed this while trying to specify a font, whose spec ended up on the last line, but without the trailing newline, `kmscon` would not honor it. --- nixos/modules/services/ttys/kmscon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/ttys/kmscon.nix b/nixos/modules/services/ttys/kmscon.nix index 6b05886756fe..d274b508300f 100644 --- a/nixos/modules/services/ttys/kmscon.nix +++ b/nixos/modules/services/ttys/kmscon.nix @@ -105,7 +105,7 @@ in { )); render = optionals cfg.hwRender [ "drm" "hwaccel" ]; fonts = optional (cfg.fonts != null) "font-name=${lib.concatMapStringsSep ", " (f: f.name) cfg.fonts}"; - in lib.concatStringsSep "\n" (xkb ++ render ++ fonts); + in lib.concatLines (xkb ++ render ++ fonts); hardware.graphics.enable = mkIf cfg.hwRender true;