mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 21:32:23 +03:00
nixos/x11: make nvidia driver work again
The nvidia driver module directly sets the services.xserver.drivers option, while still having nvidia/nvidiaBeta/... etc. in the videoDrivers option.
This commit is contained in:
parent
af8b7d3a28
commit
22088b4b25
@ -438,14 +438,15 @@ in
|
||||
|
||||
services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ];
|
||||
|
||||
services.xserver.drivers = flip map cfg.videoDrivers (name:
|
||||
# FIXME: somehow check for unknown driver names.
|
||||
services.xserver.drivers = flip concatMap cfg.videoDrivers (name:
|
||||
let driver =
|
||||
attrByPath [name]
|
||||
(if xorg ? ${"xf86video" + name}
|
||||
then { modules = [xorg.${"xf86video" + name}]; }
|
||||
else throw "Unknown video driver: ${name}")
|
||||
else null)
|
||||
knownVideoDrivers;
|
||||
in { inherit name; modules = []; driverName = name; } // driver);
|
||||
in optional (driver != null) ({ inherit name; modules = []; driverName = name; } // driver));
|
||||
|
||||
assertions =
|
||||
[ { assertion = config.security.polkit.enable;
|
||||
|
Loading…
Reference in New Issue
Block a user