From 3fe96bcca168b8b3ca9b9cb56f2568c338b0936d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 29 Apr 2014 12:58:54 +0200 Subject: Rename hardware.opengl.videoDrivers back to services.xserver.videoDrivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- nixos/modules/services/x11/terminal-server.nix | 2 +- nixos/modules/services/x11/xserver.nix | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'nixos/modules/services') 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 - instead. + 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); -- cgit 1.4.1