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;
|
|
|
|
};
|
|
|
|
|
|
|
|
redshift.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 = {
|
|
|
|
enable = true;
|
2024-02-26 12:43:05 +01:00
|
|
|
xkb.layout = "us";
|
|
|
|
xkb.options = "caps:super";
|
2022-05-09 17:04:52 +02:00
|
|
|
|
|
|
|
displayManager = {
|
|
|
|
# Give EXWM permission to control the session.
|
|
|
|
sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER";
|
|
|
|
lightdm.enable = true;
|
|
|
|
# lightdm.greeters.gtk.clock-format = "%H:%M"; # TODO(tazjin): TZ?
|
|
|
|
};
|
|
|
|
|
|
|
|
windowManager.session = lib.singleton {
|
|
|
|
name = "exwm";
|
2024-01-17 16:25:42 +01:00
|
|
|
start = "${config.tazjin.emacs}/bin/tazjins-emacs --internal-border=0 --border-width=0";
|
2022-05-09 17:04:52 +02:00
|
|
|
};
|
2024-06-09 23:14:28 +02:00
|
|
|
desktopManager.xfce.enable = true;
|
2022-05-09 17:04:52 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Set variables to enable EXWM-XIM and other Emacs features.
|
|
|
|
environment.sessionVariables = {
|
|
|
|
XMODIFIERS = "@im=exwm-xim";
|
|
|
|
GTK_IM_MODULE = "xim";
|
|
|
|
QT_IM_MODULE = "xim";
|
|
|
|
CLUTTER_IM_MODULE = "xim";
|
|
|
|
EDITOR = "emacsclient";
|
2023-07-23 20:17:00 +02:00
|
|
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
2022-05-09 17:04:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Do not restart the display manager automatically
|
|
|
|
systemd.services.display-manager.restartIfChanged = lib.mkForce false;
|
|
|
|
|
|
|
|
# If something needs more than 10s to stop it should probably be
|
|
|
|
# killed.
|
|
|
|
systemd.extraConfig = ''
|
|
|
|
DefaultTimeoutStopSec=10s
|
|
|
|
'';
|
|
|
|
}
|