anchor.diff:            '')}
           EndSection
   
  +        ${if cfg.useGlamor then ''
  +          Section "Module"
  +            Load "dri2"
  +            Load "glamoregl"
  +          EndSection
  +        '' else ""}
  +
           # For each supported driver, add a "Device" and "Screen"
           # section.
           ${flip concatMapStrings drivers (driver: ''
  
positive.code:     nvidiaLegacy304 = { modules = [ kernelPackages.nvidia_x11_legacy304 ]; driverName = "nvidia"; };
      unichrome    = { modules = [ pkgs.xorgVideoUnichrome ]; };
      virtualbox   = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; };
    };
  
    driverNames = config.hardware.opengl.videoDrivers;
  
negative.code:         '';
        };
  
        useGlamor = mkOption {
          type = types.bool;
          default = false;
          description = ''
            Whether to use the Glamor module for 2D acceleration,
            if possible.
          '';
        };
      };
  
    };
  