dotfiles/entropy/nixos/modules/sway.nix

70 lines
1.6 KiB
Nix
Raw Normal View History

2021-05-18 12:09:48 +00:00
{ pkgs, ... }:
{
programs.sway = {
enable = true;
wrapperFeatures.gtk = true; # so that gtk works properly
extraPackages = with pkgs; [
swaylock
swayidle
xwayland # for legacy apps
waybar
wl-clipboard
mako # notification daemon
2021-10-14 14:15:27 +00:00
#dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native
bemenu
2021-05-18 12:09:48 +00:00
kanshi # replacement for autorandr
sway-contrib.grimshot
imv # image viewer
];
extraSessionCommands = ''
export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
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
2021-10-14 14:15:27 +00:00
# firefox x11 <-> wayland interoperability
export MOZ_DBUS_REMOTE=1
2022-06-22 12:19:19 +00:00
# override VA-API driver
export LIBVA_DRIVER_NAME=iHD
2021-05-18 12:09:48 +00:00
'';
};
2021-11-18 18:04:41 +00:00
programs.waybar.enable = true;
2021-05-18 12:09:48 +00:00
2021-11-18 18:04:41 +00:00
services.redshift = {
enable = true;
2022-06-15 15:14:20 +00:00
package = pkgs.gammastep;
2021-11-18 18:04:41 +00:00
temperature.night = 3500;
};
2021-05-18 12:09:48 +00:00
2021-11-18 18:04:41 +00:00
# ------------ Display Manager ----------------------------------------------
2022-06-22 12:19:19 +00:00
services.xserver = {
# under protest
enable = true;
# graphics
#videoDrivers = [ "modesetting" ];
useGlamor = true;
# use sddm for authentication
displayManager.sddm.enable = true;
};
#services.xserver.videoDrivers = [
#"intel"
#"amdgpu"
#"radeon"
#"nouveau"
#"modesetting"
#"fbdev"
#];
2021-10-14 14:15:27 +00:00
#services.xserver.displayManager.gdm = {
#enable = true;
#wayland = true;
#};
2021-05-18 12:09:48 +00:00
}