2014-09-05 02:53:36 -07:00
|
|
|
# This module provides the proprietary ATI X11 / OpenGL drivers.
|
|
|
|
|
2018-11-02 22:55:57 -07:00
|
|
|
{ config, lib, pkgs, ... }:
|
2014-09-05 02:53:36 -07:00
|
|
|
|
|
|
|
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 15:02:48 -08:00
|
|
|
nixpkgs.config.xorg.abiCompat = "1.17";
|
2016-05-23 01:12:44 -07:00
|
|
|
|
2014-09-05 02:53:36 -07:00
|
|
|
services.xserver.drivers = singleton
|
2019-08-14 09:37:03 -07:00
|
|
|
{ name = "fglrx"; modules = [ ati_x11 ]; display = true; };
|
2014-09-05 02:53:36 -07:00
|
|
|
|
|
|
|
hardware.opengl.package = ati_x11;
|
2018-11-02 22:55:57 -07:00
|
|
|
hardware.opengl.package32 = pkgs.pkgsi686Linux.linuxPackages.ati_drivers_x11.override { libsOnly = true; kernel = null; };
|
2019-05-23 16:21:57 -07:00
|
|
|
hardware.opengl.setLdLibraryPath = true;
|
2014-09-05 02:53:36 -07:00
|
|
|
|
|
|
|
environment.systemPackages = [ ati_x11 ];
|
|
|
|
|
|
|
|
boot.extraModulePackages = [ ati_x11 ];
|
|
|
|
|
|
|
|
boot.blacklistedKernelModules = [ "radeon" ];
|
|
|
|
|
2019-08-13 14:52:01 -07:00
|
|
|
environment.etc.ati.source = "${ati_x11}/etc/ati";
|
2014-09-05 02:53:36 -07:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|