This commit is contained in:
2026-05-30 19:03:33 +09:00
parent f5ecef894d
commit 5f1cfc5275
155 changed files with 4168 additions and 300 deletions
+53
View File
@@ -0,0 +1,53 @@
{
pkgs,
lib,
config,
...
}:
let
cfg = config.my.applications.wayland;
in
{
options.my.applications.wayland = {
enable = lib.mkEnableOption "Wayland session support";
};
config = lib.mkIf cfg.enable {
programs.xwayland.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-wlr
pkgs.xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
config = {
common.default = [
"wlr"
"gtk"
];
niri.default = [
"wlr"
"gtk"
];
};
};
environment.variables = {
NIXOS_OZONE_WL = "1";
};
environment.sessionVariables = {
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
QT_QPA_PLATFORM = "wayland;xcb";
NIXOS_OZONE_WL = "1";
};
environment.systemPackages = with pkgs; [
xwayland-satellite # X11 compatibility layer for Wayland
uwsm # Universal Wayland Session Manager
];
};
}