3
0
Fork 0
forked from mirrors/nixpkgs

nixos/flatpak: Remove guiPackages internal option

It was basically just a `environment.systemPackages` synonym,
only GNOME used it, and it was stretching the responsibilities
of the flatpak module too far.

It also makes it cleaner to avoid installing the program
using GNOME module’s `excludePackages` option.

Partially reverts: https://github.com/NixOS/nixpkgs/pull/101516
Fixes: https://github.com/NixOS/nixpkgs/issues/110310
This commit is contained in:
Jan Tojnar 2021-05-18 13:53:10 +02:00
parent c007fb4026
commit ed47351533
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
2 changed files with 34 additions and 43 deletions

View file

@ -15,18 +15,6 @@ in {
options = {
services.flatpak = {
enable = mkEnableOption "flatpak";
guiPackages = mkOption {
internal = true;
type = types.listOf types.package;
default = [];
example = literalExample "[ pkgs.gnome.gnome-software ]";
description = ''
Packages that provide an interface for flatpak
(like gnome-software) that will be automatically available
to all users when flatpak is enabled.
'';
};
};
};
@ -40,7 +28,7 @@ in {
}
];
environment.systemPackages = [ pkgs.flatpak ] ++ cfg.guiPackages;
environment.systemPackages = [ pkgs.flatpak ];
services.dbus.packages = [ pkgs.flatpak ];

View file

@ -291,11 +291,6 @@ in
# If gnome is installed, build vim for gtk3 too.
nixpkgs.config.vim.gui = "gtk3";
# Install gnome-software if flatpak is enabled
services.flatpak.guiPackages = [
pkgs.gnome.gnome-software
];
})
(mkIf flashbackEnabled {
@ -466,31 +461,39 @@ in
# Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-38/elements/core/meta-gnome-core-utilities.bst
(mkIf serviceCfg.core-utilities.enable {
environment.systemPackages = (with pkgs.gnome; removePackagesByName [
baobab
cheese
eog
epiphany
gedit
gnome-calculator
gnome-calendar
gnome-characters
gnome-clocks
gnome-contacts
gnome-font-viewer
gnome-logs
gnome-maps
gnome-music
pkgs.gnome-photos
gnome-screenshot
gnome-system-monitor
gnome-weather
nautilus
pkgs.gnome-connections
simple-scan
totem
yelp
] config.environment.gnome.excludePackages);
environment.systemPackages =
with pkgs.gnome;
removePackagesByName
([
baobab
cheese
eog
epiphany
gedit
gnome-calculator
gnome-calendar
gnome-characters
gnome-clocks
gnome-contacts
gnome-font-viewer
gnome-logs
gnome-maps
gnome-music
pkgs.gnome-photos
gnome-screenshot
gnome-system-monitor
gnome-weather
nautilus
pkgs.gnome-connections
simple-scan
totem
yelp
] ++ lib.optionals config.services.flatpak.enable [
# Since PackageKit Nix support is not there yet,
# only install gnome-software if flatpak is enabled.
gnome-software
])
config.environment.gnome.excludePackages;
# Enable default program modules
# Since some of these have a corresponding package, we only