2023-09-11 20:23:04 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2023-09-09 22:50:25 +02:00
|
|
|
with lib;
|
2024-11-20 20:32:38 +01:00
|
|
|
mkIf (elem "desktop::sway" config.machine.services) {
|
|
|
|
programs.sway = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.sway.override {
|
|
|
|
enableXWayland = true;
|
2023-09-11 20:23:04 +02:00
|
|
|
};
|
2024-11-20 20:32:38 +01:00
|
|
|
extraPackages = with pkgs; [
|
|
|
|
file
|
|
|
|
gnome.adwaita-icon-theme
|
|
|
|
grim
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
gtk3
|
|
|
|
i3status
|
|
|
|
kanagawa
|
|
|
|
light
|
|
|
|
mako
|
|
|
|
qt5.qtwayland
|
|
|
|
rofi-wayland
|
|
|
|
slurp
|
|
|
|
swayidle
|
|
|
|
swaylock
|
|
|
|
wf-recorder
|
|
|
|
wl-clipboard
|
|
|
|
];
|
|
|
|
wrapperFeatures = {
|
|
|
|
base = true;
|
|
|
|
gtk = true;
|
|
|
|
};
|
|
|
|
extraSessionCommands = ''
|
|
|
|
export GDK_BACKEND=wayland
|
|
|
|
export CLUTTER_BACKEND=wayland
|
|
|
|
export SDL_VIDEODRIVER=wayland
|
|
|
|
# needs qt5.qtwayland in systemPackages
|
|
|
|
export QT_QPA_PLATFORM=wayland-egl
|
|
|
|
export QT_WAYLAND_FORCE_DPI=physical
|
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
|
|
|
# Fix for some Java AWT applications (e.g. Android Studio),
|
|
|
|
# use this if they aren't displayed properly:
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
|
|
# Chromium (based) applications
|
|
|
|
export NIXOS_OZONE_WL=1
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|