diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 9ac69195a67..20028d7eb6a 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -374,6 +374,8 @@ in type = with types; listOf (coercedTo str (output: { inherit output; }) (submodule { options = xrandrOptions; })); + # Set primary to true for the first head if no other has been set + # primary already. apply = heads: let hasPrimary = any (x: x.primary) heads; firstPrimary = head heads // { primary = true; };