nixos xserver: remove vaapiDrivers

Use hardware.opengl.extraPackages instead.
This commit is contained in:
Nikolay Amiantov 2016-01-25 02:57:28 +03:00
parent 1ae1791e8e
commit b52acfdf01
5 changed files with 12 additions and 20 deletions

View File

@ -174,6 +174,12 @@ nginx.override {
of adding <literal>gutenprint</literal> to the <literal>drivers</literal> list. of adding <literal>gutenprint</literal> to the <literal>drivers</literal> list.
</para> </para>
</listitem> </listitem>
<listitem>
<para><literal>services.xserver.vaapiDrivers</literal> has been removed. Use
<literal>services.hardware.opengl.extraPackages{,32}</literal> instead. You can
also specify VDPAU drivers there.</para>
</listitem>
</itemizedlist> </itemizedlist>

View File

@ -93,18 +93,21 @@ in
hardware.opengl.extraPackages = mkOption { hardware.opengl.extraPackages = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
description = '' description = ''
Additional packages to add to OpenGL drivers. Additional packages to add to OpenGL drivers. This can be used
to add additional VA-API/VDPAU drivers.
''; '';
}; };
hardware.opengl.extraPackages32 = mkOption { hardware.opengl.extraPackages32 = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
description = '' description = ''
Additional packages to add to 32-bit OpenGL drivers on Additional packages to add to 32-bit OpenGL drivers on
64-bit systems. Used when <option>driSupport32Bit</option> is 64-bit systems. Used when <option>driSupport32Bit</option> is
set. set. This can be used to add additional VA-API/VDPAU drivers.
''; '';
}; };

View File

@ -77,6 +77,7 @@ with lib;
(mkRenamedOptionModule [ "services" "xserver" "driSupport32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ]) (mkRenamedOptionModule [ "services" "xserver" "driSupport32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
(mkRenamedOptionModule [ "services" "xserver" "s3tcSupport" ] [ "hardware" "opengl" "s3tcSupport" ]) (mkRenamedOptionModule [ "services" "xserver" "s3tcSupport" ] [ "hardware" "opengl" "s3tcSupport" ])
(mkRenamedOptionModule [ "hardware" "opengl" "videoDrivers" ] [ "services" "xserver" "videoDrivers" ]) (mkRenamedOptionModule [ "hardware" "opengl" "videoDrivers" ] [ "services" "xserver" "videoDrivers" ])
(mkRenamedOptionModule [ "services" "xserver" "vaapiDrivers" ] [ "hardware" "opengl" "extraPackages" ])
(mkRenamedOptionModule [ "services" "mysql55" ] [ "services" "mysql" ]) (mkRenamedOptionModule [ "services" "mysql55" ] [ "services" "mysql" ])

View File

@ -16,13 +16,6 @@ let
cfg = config.services.xserver; cfg = config.services.xserver;
xorg = pkgs.xorg; xorg = pkgs.xorg;
vaapiDrivers = pkgs.buildEnv {
name = "vaapi-drivers";
paths = cfg.vaapiDrivers;
# We only want /lib/dri, but with a single input path, we need "/" for it to work
pathsToLink = [ "/" ];
};
fontconfig = config.fonts.fontconfig; fontconfig = config.fonts.fontconfig;
xresourcesXft = pkgs.writeText "Xresources-Xft" '' xresourcesXft = pkgs.writeText "Xresources-Xft" ''
${optionalString (fontconfig.dpi != 0) ''Xft.dpi: ${toString fontconfig.dpi}''} ${optionalString (fontconfig.dpi != 0) ''Xft.dpi: ${toString fontconfig.dpi}''}
@ -107,8 +100,6 @@ let
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults ${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
fi fi
export LIBVA_DRIVERS_PATH=${vaapiDrivers}/lib/dri
# Speed up application start by 50-150ms according to # Speed up application start by 50-150ms according to
# http://kdemonkey.blogspot.nl/2008/04/magic-trick.html # http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
rm -rf $HOME/.compose-cache rm -rf $HOME/.compose-cache

View File

@ -216,15 +216,6 @@ in
''; '';
}; };
vaapiDrivers = mkOption {
type = types.listOf types.path;
default = [ ];
example = literalExample "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
description = ''
Packages providing libva acceleration drivers.
'';
};
startGnuPGAgent = mkOption { startGnuPGAgent = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;