mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 23:52:33 +00:00
nixos/flatpak: introduce guiPackages
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. https://github.com/NixOS/nixpkgs/issues/99648#issuecomment-706691174
This commit is contained in:
parent
b1587f9e19
commit
d89deddd5d
|
@ -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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -28,7 +40,7 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.flatpak ];
|
||||
environment.systemPackages = [ pkgs.flatpak ] ++ cfg.guiPackages;
|
||||
|
||||
services.dbus.packages = [ pkgs.flatpak ];
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue