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 = {
enable = true;
xdgOpenUsePortal = true;
wlr.enable = false;
wlr.enable = true;
# TODO: Replace lib.optional(s) throughout the config with mkMerge
config = lib.mkMerge [
@ -35,6 +35,14 @@ in {
(desktopportal.hyprland.enable && desktopportal.termfilechooser.enable) {
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;

View File

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