parent
632f9060f1
commit
5e6ac5fcf3
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue