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>
This commit is contained in:
aszlig 2017-04-24 12:02:10 +02:00
parent d7a8876c13
commit 79e712822f
No known key found for this signature in database
GPG Key ID: 1DE8E48E57DB5436

View File

@ -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; };