Author: eelco
Date: Mon Aug  9 20:10:16 2010
New Revision: 23068
URL: https://svn.nixos.org/websvn/nix/?rev=23068&sc=1

Log:
* In QEMU, set a higher refresh rate in xorg.conf so that resolutions
  higher than 800x600 work.
* Add a "Monitor" statement to the "Screen" section, because otherwise
  the Monitor section is ignored.

Modified:
   nixos/trunk/modules/services/x11/xserver.nix
   nixos/trunk/modules/virtualisation/qemu-vm.nix

Modified: nixos/trunk/modules/services/x11/xserver.nix
==============================================================================
--- nixos/trunk/modules/services/x11/xserver.nix        Mon Aug  9 19:41:12 
2010        (r23067)
+++ nixos/trunk/modules/services/x11/xserver.nix        Mon Aug  9 20:10:16 
2010        (r23068)
@@ -137,6 +137,7 @@
 
       resolutions = mkOption {
         default = [];
+        example = [ { x = 1600; y = 1200; } { x = 1024; y = 786; } ];
         description = ''
           The screen resolutions for the X server.  The first element
           is the default resolution.  If this list is empty, the X
@@ -496,6 +497,9 @@
           Section "Screen"
             Identifier "Screen-${driver.name}[0]"
             Device "Device-${driver.name}[0]"
+            ${optionalString (cfg.monitorSection != "") ''
+              Monitor "Monitor[0]"
+            ''}
 
             ${cfg.screenSection}
 
@@ -508,9 +512,11 @@
             ''}
 
             ${optionalString
-                (driver.name != "virtualbox" && (cfg.resolutions != []
-                 || cfg.extraDisplaySettings != "" || cfg.virtualScreen != 
null)) (
-              let
+                (driver.name != "virtualbox" &&
+                 (cfg.resolutions != [] ||
+                  cfg.extraDisplaySettings != "" ||
+                  cfg.virtualScreen != null))
+              (let
                 f = depth:
                   ''
                     SubSection "Display"

Modified: nixos/trunk/modules/virtualisation/qemu-vm.nix
==============================================================================
--- nixos/trunk/modules/virtualisation/qemu-vm.nix      Mon Aug  9 19:41:12 
2010        (r23067)
+++ nixos/trunk/modules/virtualisation/qemu-vm.nix      Mon Aug  9 20:10:16 
2010        (r23068)
@@ -265,7 +265,12 @@
   services.xserver.videoDriver = mkOverride 50 {} null;
   services.xserver.videoDrivers = mkOverride 50 {} [ "cirrus" "vesa" ];
   services.xserver.defaultDepth = mkOverride 50 {} 0;
-  services.xserver.resolutions = mkOverride 50 {} [];
+  services.xserver.monitorSection =
+    ''
+      # Set a higher refresh rate so that resolutions > 800x600 work.
+      HorizSync 30-140
+      VertRefresh 50-160
+    '';
 
   services.mingetty.ttys = ttys ++ optional (!cfg.graphics) "ttyS0";
 
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to