1

Modules/Desktopportal: Add configuration for Niri

This commit is contained in:
2025-11-14 14:21:06 +01:00
parent 13aec0311a
commit a557a639a4
2 changed files with 10 additions and 1 deletions

View File

@ -14,7 +14,7 @@ in {
portal = { portal = {
enable = true; enable = true;
xdgOpenUsePortal = true; xdgOpenUsePortal = true;
wlr.enable = false; wlr.enable = true;
# TODO: Replace lib.optional(s) throughout the config with mkMerge # TODO: Replace lib.optional(s) throughout the config with mkMerge
config = lib.mkMerge [ config = lib.mkMerge [
@ -35,6 +35,14 @@ in {
(desktopportal.hyprland.enable && desktopportal.termfilechooser.enable) { (desktopportal.hyprland.enable && desktopportal.termfilechooser.enable) {
hyprland."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"]; hyprland."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
}) })
(lib.mkIf desktopportal.niri.enable {
niri.default = ["gtk" "gnome"];
})
(lib.mkIf (desktopportal.niri.enable && desktopportal.termfilechooser.enable) {
niri."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
})
]; ];
extraPortals = with pkgs; extraPortals = with pkgs;

View File

@ -6,4 +6,5 @@
enable = lib.mkEnableOption "Enable XDG desktop portals"; enable = lib.mkEnableOption "Enable XDG desktop portals";
termfilechooser.enable = lib.mkEnableOption "Enable xdg-desktop-portal-termfilechooser"; termfilechooser.enable = lib.mkEnableOption "Enable xdg-desktop-portal-termfilechooser";
hyprland.enable = lib.mkEnableOption "Configure portals for Hyprland"; hyprland.enable = lib.mkEnableOption "Configure portals for Hyprland";
niri.enable = lib.mkEnableOption "Configure portals for Niri";
} }