Skip to content

Commit

Permalink
nixos/flatpak: introduce guiPackages
Browse files Browse the repository at this point in the history
This adds basically an indirection to systemPackages
to automatically install an interface for flatpak for their respective
environments. e.g if I enable pantheon and flatpak you'll get appcenter,
and on gnome you'll see gnome-software.

#99648 (comment)
  • Loading branch information
worldofpeace committed Oct 24, 2020
1 parent b1587f9 commit d89dedd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nixos/modules/services/desktops/flatpak.nix
Expand Up @@ -15,6 +15,18 @@ in {
options = {
services.flatpak = {
enable = mkEnableOption "flatpak";

guiPackages = mkOption {
internal = true;
type = types.listOf types.package;
default = [];
example = literalExample "[ pkgs.gnome3.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.
'';
};
};
};

Expand All @@ -28,7 +40,7 @@ in {
}
];

environment.systemPackages = [ pkgs.flatpak ];
environment.systemPackages = [ pkgs.flatpak ] ++ cfg.guiPackages;

services.dbus.packages = [ pkgs.flatpak ];

Expand Down
5 changes: 5 additions & 0 deletions nixos/modules/services/x11/desktop-managers/gnome3.nix
Expand Up @@ -207,6 +207,11 @@ in

# If gnome3 is installed, build vim for gtk3 too.
nixpkgs.config.vim.gui = "gtk3";

# Install gnome-software if flatpak is enabled
services.flatpak.guiPackages = [
pkgs.gnome3.gnome-software
];
})

(mkIf flashbackEnabled {
Expand Down

0 comments on commit d89dedd

Please sign in to comment.