mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 06:08:11 +09:00
50 lines
959 B
Nix
50 lines
959 B
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;
|
|
|
|
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"
|
|
];
|
|
};
|
|
};
|
|
|
|
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
|
|
];
|
|
};
|
|
}
|