diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index 2c2f2cae4b74..ffdf7e9a86eb 100644 --- a/nixos/modules/services/x11/desktop-managers/default.nix +++ b/nixos/modules/services/x11/desktop-managers/default.nix @@ -72,7 +72,9 @@ in apply = map (d: d // { manage = "desktop"; start = d.start - + optionalString (needBGCond d) ''\n\n + # literal newline to ensure d.start's last line is not appended to + + optionalString (needBGCond d) '' + if [ -e $HOME/.background-image ]; then ${pkgs.feh}/bin/feh --bg-${cfg.wallpaper.mode} ${optionalString cfg.wallpaper.combineScreens "--no-xinerama"} $HOME/.background-image fi