Merge pull request #98510 from mvnetbiz/gnome3-excludepackages

nixos/gnome3: don't enable modules for excludePackages
This commit is contained in:
WORLDofPEACE 2020-10-06 01:19:04 -04:00 committed by GitHub
commit 89281dd1df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,15 +363,6 @@ in
/* gnome-boxes */
] config.environment.gnome3.excludePackages);
# Enable default programs
programs.evince.enable = mkDefault true;
programs.file-roller.enable = mkDefault true;
programs.geary.enable = mkDefault true;
programs.gnome-disks.enable = mkDefault true;
programs.gnome-terminal.enable = mkDefault true;
programs.seahorse.enable = mkDefault true;
services.gnome3.sushi.enable = mkDefault true;
# Let nautilus find extensions
# TODO: Create nautilus-with-extensions package
environment.sessionVariables.NAUTILUS_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-3.0";
@ -384,6 +375,25 @@ in
];
})
# Enable default program modules
# Since some of these have a corresponding package, we only
# enable that program module if the package hasn't been excluded
# through `environment.gnome3.excludePackages`
(
let
notExcluded = pkg: mkDefault (!(lib.elem pkg config.environment.gnome3.excludePackages));
in
with pkgs.gnome3;
{
programs.evince.enable = notExcluded evince;
programs.file-roller.enable = notExcluded file-roller;
programs.geary.enable = notExcluded geary;
programs.gnome-disks.enable = notExcluded gnome-disk-utility;
programs.gnome-terminal.enable = notExcluded gnome-terminal;
programs.seahorse.enable = notExcluded seahorse;
services.gnome3.sushi.enable = notExcluded sushi;
})
(mkIf serviceCfg.games.enable {
environment.systemPackages = (with pkgs.gnome3; removePackagesByName [
aisleriot atomix five-or-more four-in-a-row gnome-chess gnome-klotski