nixos/wayland: add gtk portal by default

This commit is contained in:
Ali Rizvi 2024-09-30 08:07:42 -04:00
parent a968fa0376
commit 9020d82c70
No known key found for this signature in database
GPG Key ID: BCB5CEFDE22282F5
8 changed files with 13 additions and 7 deletions

View File

@ -19,6 +19,6 @@ in
# To make a cardboard session available for certain DMs like SDDM
services.displayManager.sessionPackages = [ cfg.package ];
}
(import ./wayland-session.nix { inherit lib; })
(import ./wayland-session.nix { inherit lib pkgs; })
]);
}

View File

@ -70,7 +70,7 @@ in
}
(import ./wayland-session.nix {
inherit lib;
inherit lib pkgs;
enableXWayland = cfg.xwayland.enable;
enableWlrPortal = lib.mkDefault false; # Hyprland has its own portal, wlr is not needed
})

View File

@ -20,6 +20,6 @@ in
# To make a labwc session available for certain DMs like SDDM
services.displayManager.sessionPackages = [ cfg.package ];
}
(import ./wayland-session.nix { inherit lib; })
(import ./wayland-session.nix { inherit lib pkgs; })
]);
}

View File

@ -30,11 +30,12 @@ in
}
(import ./wayland-session.nix {
inherit lib;
inherit lib pkgs;
# Hardcoded path in Mir, not really possible to disable
enableXWayland = true;
# No portal support yet: https://github.com/mattkae/miracle-wm/issues/164
enableWlrPortal = false;
enableGtkPortal = false;
})
]
);

View File

@ -56,7 +56,7 @@ in
}
(import ./wayland-session.nix {
inherit lib;
inherit lib pkgs;
enableXWayland = cfg.xwayland.enable;
})
]);

View File

@ -148,7 +148,7 @@ in
}
(import ./wayland-session.nix {
inherit lib;
inherit lib pkgs;
enableXWayland = cfg.xwayland.enable;
})
]);

View File

@ -63,7 +63,7 @@ in
};
}
(import ./wayland-session.nix {
inherit lib;
inherit lib pkgs;
enableXWayland = cfg.xwayland.enable;
})
]

View File

@ -1,7 +1,9 @@
{
lib,
pkgs,
enableXWayland ? true,
enableWlrPortal ? true,
enableGtkPortal ? true,
}:
{
@ -18,6 +20,9 @@
services.graphical-desktop.enable = true;
xdg.portal.wlr.enable = enableWlrPortal;
xdg.portal.extraPortals = lib.mkIf enableGtkPortal [
pkgs.xdg-desktop-portal-gtk
];
# Window manager only sessions (unlike DEs) don't handle XDG
# autostart files, so force them to run the service