nixos-configuration/modules/sway.nix
2024-05-13 14:25:32 +00:00

36 lines
859 B
Nix

{ config, lib, pkgs, ... }:
lib.mkIf (config.jalr.gui.enable && config.jalr.gui.desktop == "sway") {
programs.sway = {
enable = true;
# FIXME: move to home manager
extraPackages = with pkgs; [
grim
mako
gammastep
slurp
wl-clipboard
xwayland
];
extraSessionCommands = ''
export XKB_DEFAULT_LAYOUT=de # TODO: test if we need it
export XKB_DEFAULT_VARIANT=neo # TODO: test if we need it
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export ELM_ENGINE=wayland_shm
export GDK_BACKEND=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
'';
};
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
icons.enable = true;
};
}