about summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-29 12:58:54 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-29 14:42:36 +0200
commit3fe96bcca168b8b3ca9b9cb56f2568c338b0936d (patch)
tree17d9cf57b9abcf2d6256e6550c0028861ef08ec9 /nixos/modules/services
parente6b5c0121f2cdaaf1e63b16c74337bb87aae42b2 (diff)
downloadnixlib-3fe96bcca168b8b3ca9b9cb56f2568c338b0936d.tar
nixlib-3fe96bcca168b8b3ca9b9cb56f2568c338b0936d.tar.gz
nixlib-3fe96bcca168b8b3ca9b9cb56f2568c338b0936d.tar.bz2
nixlib-3fe96bcca168b8b3ca9b9cb56f2568c338b0936d.tar.lz
nixlib-3fe96bcca168b8b3ca9b9cb56f2568c338b0936d.tar.xz
nixlib-3fe96bcca168b8b3ca9b9cb56f2568c338b0936d.tar.zst
nixlib-3fe96bcca168b8b3ca9b9cb56f2568c338b0936d.zip
Rename hardware.opengl.videoDrivers back to services.xserver.videoDrivers
Fixes #2379.
The new name was a misnomer because the values really are X11 video
drivers (e.g. ‘cirrus’ or ‘nvidia’), not OpenGL implementations. That
it's also used to set an OpenGL implementation for kmscon is just
confusing overloading.
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/x11/terminal-server.nix2
-rw-r--r--nixos/modules/services/x11/xserver.nix18
2 files changed, 16 insertions, 4 deletions
diff --git a/nixos/modules/services/x11/terminal-server.nix b/nixos/modules/services/x11/terminal-server.nix
index bdc23c0acd18..a036e085b0bf 100644
--- a/nixos/modules/services/x11/terminal-server.nix
+++ b/nixos/modules/services/x11/terminal-server.nix
@@ -27,7 +27,7 @@ in
   config = {
 
     services.xserver.enable = true;
-    hardware.opengl.videoDrivers = [];
+    services.xserver.videoDrivers = [];
 
     # Enable KDM.  Any display manager will do as long as it supports XDMCP.
     services.xserver.displayManager.kdm.enable = true;
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 65f93b544996..941d08c46414 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -24,7 +24,7 @@ let
     intel-testing = { modules = with pkgs.xorg; [ xf86videointel-testing glamoregl ]; driverName = "intel"; };
   };
 
-  driverNames = config.hardware.opengl.videoDrivers;
+  driverNames = cfg.videoDrivers;
 
   needsAcpid =
      (elem "nvidia" driverNames) ||
@@ -181,6 +181,18 @@ in
         '';
       };
 
+      videoDrivers = mkOption {
+        type = types.listOf types.str;
+        # !!! We'd like "nv" here, but it segfaults the X server.
+        default = [ "ati" "cirrus" "intel" "vesa" "vmware" ];
+        example = [ "vesa" ];
+        description = ''
+          The names of the video drivers the configuration
+          supports. They will be tried in order until one that
+          supports your card is found.
+        '';
+      };
+
       videoDriver = mkOption {
         type = types.nullOr types.str;
         default = null;
@@ -188,7 +200,7 @@ in
         description = ''
           The name of the video driver for your graphics card.  This
           option is obsolete; please set the
-          <option>hardware.opengl.videoDrivers</option> instead.
+          <option>services.xserver.videoDrivers</option> instead.
         '';
       };
 
@@ -386,7 +398,7 @@ in
 
   config = mkIf cfg.enable {
     hardware.opengl.enable = true;
-    hardware.opengl.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ];
+    services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ];
 
     assertions =
       [ { assertion = !(config.programs.ssh.startAgent && cfg.startGnuPGAgent);