nixos-config/sway.nix

85 lines
1.8 KiB
Nix
Raw Permalink Normal View History

2019-03-09 22:46:35 +01:00
{ config, pkgs, ... }:
{
2020-07-14 16:47:09 +02:00
imports = [
./common-gui.nix
];
2019-03-09 22:46:35 +01:00
2022-01-30 15:22:26 +01:00
environment.systemPackages = with pkgs; [
2019-03-09 22:46:35 +01:00
i3status
(waybar.override { pulseSupport = true; })
2022-05-03 17:32:16 +02:00
rofi-wayland
2020-07-14 16:34:54 +02:00
ydotool
2022-04-16 17:07:13 +02:00
wtype
2020-08-17 11:02:28 +02:00
wl-clipboard
2019-03-09 22:46:35 +01:00
feh
2022-01-30 15:22:26 +01:00
gnome3.gnome-keyring
2019-03-09 22:46:35 +01:00
networkmanagerapplet
2019-10-11 13:04:41 +02:00
pcmanfm
2019-03-09 22:46:35 +01:00
evince
2019-03-10 09:53:33 +01:00
grim
mako
2019-03-09 22:46:35 +01:00
pavucontrol
2020-10-10 15:46:50 +02:00
paprefs
2022-01-30 15:22:26 +01:00
gnome3.dconf-editor
2019-03-09 22:46:35 +01:00
2019-03-10 17:57:25 +01:00
xdg_utils # for xdg-open
2019-03-09 22:46:35 +01:00
# gnome3 core packages
2022-03-20 14:58:40 +01:00
desktop-file-utils shared-mime-info
2019-03-09 22:46:35 +01:00
glib gtk3
2022-03-20 14:58:40 +01:00
glib-networking gvfs dconf
2022-04-07 18:50:58 +02:00
gnome-themes-extra gnome3.adwaita-icon-theme
2022-03-20 14:58:40 +01:00
hicolor-icon-theme
2019-03-09 22:46:35 +01:00
# for QT_QPA_PLATFORM=wayland
qt5.qtwayland
2020-07-14 15:09:49 +02:00
wdisplays
2022-05-31 17:01:19 +02:00
2022-06-27 19:59:04 +02:00
playerctl
2022-05-31 17:01:19 +02:00
xorg.xlsclients
2019-03-09 22:46:35 +01:00
];
2022-01-30 15:22:26 +01:00
# services.dbus.socketActivated = true;
2020-09-20 17:00:59 +02:00
2019-05-14 16:14:18 +02:00
programs.sway = {
2019-03-09 22:46:35 +01:00
enable = true;
2022-04-07 18:50:58 +02:00
wrapperFeatures.gtk = true;
2019-03-09 22:46:35 +01:00
extraSessionCommands = ''
export SDL_VIDEODRIVER=wayland
2020-07-16 12:40:19 +02:00
# https://github.com/swaywm/sway/issues/4506
export QT_QPA_PLATFORM=xcb
# export QT_QPA_PLATFORM=wayland
2019-03-09 22:46:35 +01:00
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
2019-03-10 09:53:33 +01:00
export _JAVA_AWT_WM_NONREPARENTING=1
2019-03-09 22:46:35 +01:00
2020-07-14 15:09:49 +02:00
# rust winit's wayland support is broken for input methods
export WINIT_UNIX_BACKEND=x11
2019-03-09 22:46:35 +01:00
export XDG_DATA_DIRS=/run/current-system/sw/share/''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS
2022-01-30 15:22:26 +01:00
export $(${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg)
2020-07-16 14:49:42 +02:00
export XDG_CURRENT_DESKTOP=sway
2019-03-09 22:46:35 +01:00
'';
};
2022-05-31 17:01:19 +02:00
# services.xserver = {
# enable = true;
# libinput.enable = true;
# # displayManager.lightdm.enable = true;
# displayManager.defaultSession = "sway";
# };
2020-07-14 15:09:49 +02:00
2020-07-14 16:47:09 +02:00
services.dbus.packages = with pkgs; [ mako ];
2020-07-14 15:09:49 +02:00
2020-07-16 14:49:42 +02:00
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
2019-03-09 22:46:35 +01:00
}