Refactoring config preparing for server

This commit is contained in:
Lyes Saadi 2025-10-04 14:59:18 +02:00
parent 2bffc8d711
commit 6992836cfe
Signed by: lyes
GPG key ID: 55A1D803917CF39A
18 changed files with 165 additions and 10 deletions

View file

@ -0,0 +1,47 @@
{ pkgs, ... }:
let xwayland-sway =
(pkgs.writeScriptBin "Xwayland-sway" ''
#! ${pkgs.bash}/bin/bash
exec ${pkgs.xwayland}/bin/Xwayland "$@" -hidpi
'');
in
{
programs.sway = {
enable = true;
wrapperFeatures = {
base = true;
gtk = true;
};
extraSessionCommands = ''
# SDL:
export SDL_VIDEODRIVER=wayland
# QT (needs qt5.qtwayland in systemPackages):
export QT_QPA_PLATFORM=wayland-egl
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
export WLR_XWAYLAND=${xwayland-sway}/bin/Xwayland-sway
'';
extraPackages = with pkgs; [
brightnessctl
grim
swayidle
swaylock
wmenu
mako
waybar
poweralertd
lxsession
networkmanagerapplet
wofi
wlogout
slurp
];
};
environment.systemPackages = [
xwayland-sway
];
}