Refactoring config preparing for server
This commit is contained in:
parent
2bffc8d711
commit
6992836cfe
18 changed files with 165 additions and 10 deletions
47
modules/desktop/sway/default.nix
Normal file
47
modules/desktop/sway/default.nix
Normal 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
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue