From e48a3e8e44f6179b7d8fbc12b5fa985033214030 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Tue, 14 Dec 2021 01:06:17 -0500 Subject: [PATCH] Added flatpak I would like to get this a little simpler so you don't have to manually add the remote. But this is pretty trivial to do. I'll revisit this later. --- modules/system/default.nix | 2 +- modules/system/flatpak.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 modules/system/flatpak.nix 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 ]; + }; + }; + +}