Skip to content

Commit

Permalink
nixos/xserver: Document xrandrHeads.apply
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aszlig committed Apr 24, 2017
1 parent d7a8876 commit 79e7128
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixos/modules/services/x11/xserver.nix
Expand Up @@ -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; };
Expand Down

0 comments on commit 79e7128

Please sign in to comment.