nixos/x11: output sections for modesetting driver

See #17487.
This commit is contained in:
Gabriel Ebner 2016-08-05 18:29:02 +02:00
parent 632f9060f1
commit 5e6ac5fcf3

View file

@ -14,6 +14,9 @@ let
# Map video driver names to driver packages. FIXME: move into card-specific modules.
knownVideoDrivers = {
virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; };
# modesetting does not have a xf86videomodesetting package as it is included in xorgserver
modesetting = {};
};
fontsForXServer =
@ -435,15 +438,14 @@ in
services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ];
# FIXME: somehow check for unknown driver names.
services.xserver.drivers = flip concatMap cfg.videoDrivers (name:
services.xserver.drivers = flip map cfg.videoDrivers (name:
let driver =
attrByPath [name]
(if xorg ? ${"xf86video" + name}
then { modules = [xorg.${"xf86video" + name}]; }
else null)
else throw "Unknown video driver: ${name}")
knownVideoDrivers;
in optional (driver != null) ({ inherit name; driverName = name; } // driver));
in { inherit name; modules = []; driverName = name; } // driver);
assertions =
[ { assertion = config.security.polkit.enable;