anchor.diff:            EndSection
           '')}
   
  +        ${xrandrMonitorSections}
           ${cfg.extraXorgOptions}
         '';
   
  
positive.code:         default = "";
          example = "HorizSync 28-49";
          description = "Contents of the first Monitor section of the X server configuration file.";
        };
  
        moduleSection = mkOption {
  
negative.code:       pkgs.xorg.fontadobe75dpi
      ];
  
    # Just enumerate all heads without discarding XRandR output information.
    xrandrHeads = let
      mkHead = num: output: {
        name = "multihead${toString num}";
        inherit output;
      };
    in imap mkHead cfg.xrandrHeads;
  
    xrandrDeviceSection = flip concatMapStrings xrandrHeads (h: ''
      Option "monitor-${h.output}" "${h.name}"
    '');
  
    # Here we chain every monitor from the left to right, so we have:
    # m4 right of m3 right of m2 right of m1   .----.----.----.----.
    # Which will end up in reverse ----------> | m1 | m2 | m3 | m4 |
    #                                          `----^----^----^----'
    xrandrMonitorSections = let
      mkMonitor = previous: current: previous ++ singleton {
        inherit (current) name;
        value = ''
          Section "Monitor"
            Identifier "${current.name}"
            ${optionalString (previous != []) ''
            Option "RightOf" "${(head previous).name}"
            ''}
          EndSection
        '';
      };
      monitors = foldl mkMonitor [] xrandrHeads;
    in concatMapStrings (getAttr "value") monitors;
  
    configFile = pkgs.stdenv.mkDerivation {
      name = "xserver.conf";
  