Add environment.gnome3.excludePackages

Give the user a full desktop, and the possibility to exclude
non-base packages from the default list of packages.
This commit is contained in:
Luca Bruno 2014-04-09 00:02:20 +02:00
parent ba200a2c3c
commit a3115707dd
2 changed files with 35 additions and 15 deletions

View File

@ -226,4 +226,7 @@ in rec {
deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y; deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y;
crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f]; crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f];
# List difference, xs - ys. Removes elements of ys from xs.
difference = xs: ys: filter (y: !(builtins.elem y ys)) xs;
} }

View File

@ -15,6 +15,13 @@ in {
description = "Enable Gnome 3 desktop manager."; description = "Enable Gnome 3 desktop manager.";
}; };
environment.gnome3.excludePackages = mkOption {
default = [];
example = "[ pkgs.gnome3.totem ]";
type = types.listOf types.package;
description = "Which packages gnome should exclude from the default environment";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -51,25 +58,35 @@ in {
environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules" environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules"
"${pkgs.glib_networking}/lib/gio/modules" ]; "${pkgs.glib_networking}/lib/gio/modules" ];
environment.systemPackages = environment.systemPackages =
[ gnome3.evince [ gnome3.dconf
gnome3.eog
gnome3.dconf
gnome3.vino
gnome3.epiphany
gnome3.baobab
gnome3.gucharmap
gnome3.nautilus
gnome3.yelp
pkgs.glib_networking pkgs.glib_networking
pkgs.ibus pkgs.ibus
gnome3.gnome-backgrounds gnome3.gnome-backgrounds
gnome3.gnome_shell
gnome3.gnome_settings_daemon
gnome3.gnome_terminal
gnome3.gnome_icon_theme
gnome3.gnome_themes_standard
gnome3.gnome_control_center gnome3.gnome_control_center
]; gnome3.gnome_icon_theme
gnome3.gnome_settings_daemon
gnome3.gnome_shell
gnome3.gnome_themes_standard
] ++ (lists.difference [
gnome3.baobab
gnome3.eog
gnome3.epiphany
gnome3.evince
gnome3.gucharmap
gnome3.nautilus
gnome3.totem
gnome3.vino
gnome3.yelp
gnome3.gnome-calculator
gnome3.gnome-contacts
gnome3.gnome-font-viewer
gnome3.gnome-screenshot
gnome3.gnome-system-log
gnome3.gnome-system-monitor
gnome3.gnome_terminal
gnome3.file-roller
] config.environment.gnome3.excludePackages);
}; };