nixos/xserver: add excludePackages option

to remove packages environment.systemPackages
This commit is contained in:
Sandro Jäckel 2022-04-11 01:09:36 +02:00
parent 42948b3006
commit 28e936ba64
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -181,6 +181,13 @@ in
'';
};
excludePackages = mkOption {
default = [];
example = literalExpression "[ pkgs.xterm ]";
type = types.listOf types.package;
description = "Which X11 packages to exclude from the default environment";
};
exportConfiguration = mkOption {
type = types.bool;
default = false;
@ -655,7 +662,7 @@ in
${cfgPath}.source = xorg.xf86inputevdev.out + "/share" + cfgPath;
});
environment.systemPackages =
environment.systemPackages = pkgs.gnome.removePackagesByName
[ xorg.xorgserver.out
xorg.xrandr
xorg.xrdb
@ -671,7 +678,7 @@ in
pkgs.xdg-utils
xorg.xf86inputevdev.out # get evdev.4 man page
pkgs.nixos-icons # needed for gnome and pantheon about dialog, nixos-manual and maybe more
]
] config.services.xserver.excludePackages
++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh;
environment.pathsToLink = [ "/share/X11" ];