From 79e712822fcfe797c545e2db5bcef9a07b00b2e5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 24 Apr 2017 12:02:10 +0200 Subject: [PATCH] nixos/xserver: Document xrandrHeads.apply It was asked by @CMCDragonkai to elaborate on that, so let's just do this by actually providing a code comment. Signed-off-by: aszlig --- nixos/modules/services/x11/xserver.nix | 2 ++ 1 file changed, 2 insertions(+) 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; };