diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-01-17 00:03:55 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-01-17 07:13:25 +0100 |
commit | bedc81fcb6b67b4a280d03c95f7c5af248aa670c (patch) | |
tree | 1447754523dd60730914a524842a52dde942c3ce /nixos/modules/services/x11/desktop-managers/mate.nix | |
parent | 626233eee6ea309733d2d98625750cca904799a5 (diff) |
nixos/desktops: deduplicate removePackagesByName
GNOME, MATE and LxQt all use removePackagesByName. Let’s move it to a single place, rename the attributes to meaningful name and add docs.
Diffstat (limited to 'nixos/modules/services/x11/desktop-managers/mate.nix')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/mate.nix | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/mate.nix b/nixos/modules/services/x11/desktop-managers/mate.nix index db83aaf3c19f3..4d2fafd149617 100644 --- a/nixos/modules/services/x11/desktop-managers/mate.nix +++ b/nixos/modules/services/x11/desktop-managers/mate.nix @@ -4,14 +4,6 @@ with lib; let - # Remove packages of ys from xs, based on their names - removePackagesByName = xs: ys: - let - pkgName = drv: (builtins.parseDrvName drv.name).name; - ysNames = map pkgName ys; - in - filter (x: !(builtins.elem (pkgName x) ysNames)) xs; - addToXDGDirs = p: '' if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name} @@ -96,7 +88,7 @@ in environment.systemPackages = pkgs.mate.basePackages ++ - (removePackagesByName + (pkgs.gnome3.removePackagesByName pkgs.mate.extraPackages config.environment.mate.excludePackages); |