2014-09-05 10:53:36 +01:00
|
|
|
# This module provides the proprietary ATI X11 / OpenGL drivers.
|
|
|
|
|
|
|
|
{ config, lib, pkgs, pkgs_i686, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
drivers = config.services.xserver.videoDrivers;
|
|
|
|
|
|
|
|
enabled = elem "ati_unfree" drivers;
|
|
|
|
|
|
|
|
ati_x11 = config.boot.kernelPackages.ati_drivers_x11;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
config = mkIf enabled {
|
|
|
|
|
2017-01-29 23:02:48 +00:00
|
|
|
nixpkgs.config.xorg.abiCompat = "1.17";
|
2016-05-23 09:12:44 +01:00
|
|
|
|
2014-09-05 10:53:36 +01:00
|
|
|
services.xserver.drivers = singleton
|
|
|
|
{ name = "fglrx"; modules = [ ati_x11 ]; libPath = [ "${ati_x11}/lib" ]; };
|
|
|
|
|
|
|
|
hardware.opengl.package = ati_x11;
|
2014-09-06 05:17:00 +01:00
|
|
|
hardware.opengl.package32 = pkgs_i686.linuxPackages.ati_drivers_x11.override { libsOnly = true; kernel = null; };
|
2014-09-05 10:53:36 +01:00
|
|
|
|
|
|
|
environment.systemPackages = [ ati_x11 ];
|
|
|
|
|
|
|
|
boot.extraModulePackages = [ ati_x11 ];
|
|
|
|
|
|
|
|
boot.blacklistedKernelModules = [ "radeon" ];
|
|
|
|
|
|
|
|
environment.etc."ati".source = "${ati_x11}/etc/ati";
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|