Files
dotfiles/modules/applications/wayland.nix
moons-14 ad8d66cde1
Publish Nix cache / Build and publish uncached paths (push) Has been cancelled
NixOS CI / Validate flake (push) Has been cancelled
NixOS CI / Build ${{ matrix.host }} (push) Has been cancelled
NixOS CI / Report main status (push) Has been cancelled
zoom
2026-07-20 06:28:35 +09:00

52 lines
1.1 KiB
Nix

{
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;
# Keep global Wayland portal settings in this module so hardware/application
# modules do not each append their own portal backends.
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gnome
pkgs.xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
config = {
common.default = [ "gtk" ];
gnome.default = [
"gnome"
"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
];
};
}