summary refs log tree commit diff
path: root/nixos/modules/services/x11/xserver.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-04-24 12:02:10 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-04-24 12:02:10 +0200
commit79e712822fcfe797c545e2db5bcef9a07b00b2e5 (patch)
treed87b6c295d6f7da5023b2564ebc397e61142fc6e /nixos/modules/services/x11/xserver.nix
parentd7a8876c13f75e7a55e2f3cbc16346406e9abdf8 (diff)
downloadnixlib-79e712822fcfe797c545e2db5bcef9a07b00b2e5.tar
nixlib-79e712822fcfe797c545e2db5bcef9a07b00b2e5.tar.gz
nixlib-79e712822fcfe797c545e2db5bcef9a07b00b2e5.tar.bz2
nixlib-79e712822fcfe797c545e2db5bcef9a07b00b2e5.tar.lz
nixlib-79e712822fcfe797c545e2db5bcef9a07b00b2e5.tar.xz
nixlib-79e712822fcfe797c545e2db5bcef9a07b00b2e5.tar.zst
nixlib-79e712822fcfe797c545e2db5bcef9a07b00b2e5.zip
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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/modules/services/x11/xserver.nix')
-rw-r--r--nixos/modules/services/x11/xserver.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 9ac69195a679..20028d7eb6a8 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; };