2022-05-09 17:04:52 +02:00
|
|
|
# EXWM and other desktop configuration.
|
2023-08-29 16:10:11 +02:00
|
|
|
{ config, depot, lib, pkgs, ... }:
|
2022-05-09 17:04:52 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
services = {
|
|
|
|
pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
2023-06-14 11:10:44 +02:00
|
|
|
alsa.support32Bit = true;
|
2022-05-09 17:04:52 +02:00
|
|
|
pulse.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
blueman.enable = true;
|
2024-06-09 13:59:17 +02:00
|
|
|
libinput.enable = true;
|
2022-05-09 17:04:52 +02:00
|
|
|
|
|
|
|
xserver = {
|
2024-09-01 00:03:16 +02:00
|
|
|
enable = true; # wayland doesn't work otherwise ...?!
|
2024-08-31 20:50:52 +02:00
|
|
|
displayManager.gdm = {
|
|
|
|
enable = true;
|
|
|
|
wayland = true;
|
2022-05-09 17:04:52 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-01 00:03:16 +02:00
|
|
|
services.displayManager.sessionPackages = [ pkgs.niri ];
|
|
|
|
|
2024-08-31 20:50:52 +02:00
|
|
|
programs.xwayland.enable = true;
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# core packages
|
|
|
|
niri
|
|
|
|
xwayland-satellite
|
|
|
|
swaylock
|
|
|
|
|
|
|
|
# support tooling
|
2024-09-01 23:52:31 +02:00
|
|
|
alacritty
|
2024-08-31 20:50:52 +02:00
|
|
|
qt5.qtwayland
|
|
|
|
swayidle
|
2024-09-02 00:11:54 +02:00
|
|
|
waybar
|
2024-08-31 20:50:52 +02:00
|
|
|
wdisplays
|
|
|
|
wl-mirror
|
|
|
|
xfce.xfce4-appfinder
|
|
|
|
];
|
2022-05-09 17:04:52 +02:00
|
|
|
|
|
|
|
# Do not restart the display manager automatically
|
|
|
|
systemd.services.display-manager.restartIfChanged = lib.mkForce false;
|
|
|
|
|
2024-09-03 22:43:28 +02:00
|
|
|
# pipewire MUST start before niri, otherwise screen sharing doesn't work
|
|
|
|
systemd.user.services.pipewire.wantedBy = [ "niri.service" ];
|
|
|
|
systemd.user.services.pipewire.before = [ "niri.service" ];
|
|
|
|
|
2024-09-03 23:31:00 +02:00
|
|
|
# enable "desktop portals", which are important somehow
|
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
|
|
|
extraPortals = with pkgs; [
|
|
|
|
xdg-desktop-portal-gtk
|
|
|
|
xdg-desktop-portal-gnome
|
|
|
|
];
|
|
|
|
config.common.default = "*";
|
|
|
|
};
|
|
|
|
|
2024-08-31 20:50:52 +02:00
|
|
|
# swaylock needs an empty PAM configuration, otherwise it locks the user out
|
|
|
|
security.pam.services.swaylock = { };
|
|
|
|
|
2024-09-01 16:38:17 +02:00
|
|
|
# enable theming support for Qt that is compatible with Chicago95 theme
|
|
|
|
qt.enable = true;
|
|
|
|
qt.platformTheme = "qt5ct";
|
|
|
|
|
2022-05-09 17:04:52 +02:00
|
|
|
# If something needs more than 10s to stop it should probably be
|
|
|
|
# killed.
|
|
|
|
systemd.extraConfig = ''
|
|
|
|
DefaultTimeoutStopSec=10s
|
|
|
|
'';
|
|
|
|
}
|