diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-07-18 20:00:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-18 20:00:09 -0400 |
commit | 69f2836c1bbfbd94322ec740ded789bc6ec3a440 (patch) | |
tree | 3cf6740300e4a0fcd31622f8cbc8c2e5460edd56 /nixos/modules/services | |
parent | 3e25412e3b743c771e9f36466aadd8a990ee4f6b (diff) | |
parent | 90b1197301eb714e64a508c3be2dd073b24caed3 (diff) | |
download | nixlib-69f2836c1bbfbd94322ec740ded789bc6ec3a440.tar nixlib-69f2836c1bbfbd94322ec740ded789bc6ec3a440.tar.gz nixlib-69f2836c1bbfbd94322ec740ded789bc6ec3a440.tar.bz2 nixlib-69f2836c1bbfbd94322ec740ded789bc6ec3a440.tar.lz nixlib-69f2836c1bbfbd94322ec740ded789bc6ec3a440.tar.xz nixlib-69f2836c1bbfbd94322ec740ded789bc6ec3a440.tar.zst nixlib-69f2836c1bbfbd94322ec740ded789bc6ec3a440.zip |
Merge pull request #64575 from pasqui23/portal
nixos/xdg: add portal option
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/desktops/flatpak.nix | 22 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/gnome3.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/plasma5.nix | 2 |
3 files changed, 6 insertions, 20 deletions
diff --git a/nixos/modules/services/desktops/flatpak.nix b/nixos/modules/services/desktops/flatpak.nix index cfca1893bd82..824634061180 100644 --- a/nixos/modules/services/desktops/flatpak.nix +++ b/nixos/modules/services/desktops/flatpak.nix @@ -15,38 +15,22 @@ in { options = { services.flatpak = { enable = mkEnableOption "flatpak"; - - extraPortals = mkOption { - type = types.listOf types.package; - default = []; - description = '' - List of additional portals to add to path. Portals allow interaction - with system, like choosing files or taking screenshots. At minimum, - a desktop portal implementation should be listed. GNOME already - adds <package>xdg-desktop-portal-gtk</package>; for KDE, there - is <package>xdg-desktop-portal-kde</package>. Other desktop - environments will probably want to do the same. - ''; - }; }; }; ###### implementation config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.flatpak ]; - services.dbus.packages = [ pkgs.flatpak pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; + services.dbus.packages = [ pkgs.flatpak ]; - systemd.packages = [ pkgs.flatpak pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; + systemd.packages = [ pkgs.flatpak ]; environment.profiles = [ "$HOME/.local/share/flatpak/exports" "/var/lib/flatpak/exports" ]; - - environment.variables = { - XDG_DESKTOP_PORTAL_PATH = map (p: "${p}/share/xdg-desktop-portal/portals") cfg.extraPortals; - }; }; } diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index ef6820d33260..4a7a4804e1aa 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -154,7 +154,7 @@ in { services.hardware.bolt.enable = mkDefault true; services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center systemd.packages = [ pkgs.gnome3.vino ]; - services.flatpak.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; # If gnome3 is installed, build vim for gtk3 too. nixpkgs.config.vim.gui = "gtk3"; diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index 4b7773c4c6d0..14304e00dae4 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -224,6 +224,8 @@ in security.pam.services.sddm.enableKwallet = true; security.pam.services.slim.enableKwallet = true; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ]; + # Update the start menu for each user that is currently logged in system.userActivationScripts.plasmaSetup = '' # The KDE icon cache is supposed to update itself |