diff --git a/modules/system/default.nix b/modules/system/default.nix index 736bea1..ef5efd2 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -1 +1 @@ -{ config, pkgs, ... }: { imports = [ ./gtk.nix ./xdg.nix ]; } +{ config, pkgs, ... }: { imports = [ ./gtk.nix ./xdg.nix ./flatpak.nix ]; } diff --git a/modules/system/flatpak.nix b/modules/system/flatpak.nix new file mode 100644 index 0000000..8ca23ba --- /dev/null +++ b/modules/system/flatpak.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.systems.flatpak; + graphical = config.graphical; +in with lib; { + options = { + systems.flatpak = { + enable = mkOption { + default = graphical.enable; + type = with types; bool; + description = "When they tried to do docker for GUIs"; + }; + }; + }; + + config = mkIf cfg.enable { + services.flatpak.enable = true; + xdg.portal = { + enable = true; + extraPortals = + [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ]; + }; + }; + +}