From 11aacd7857dd4fef98329e2b0d3d60932125f952 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 31 Aug 2024 21:50:52 +0300 Subject: feat(tazjin/nixos): setup niri (scrolling window manager) This commit is experimental for now. The backstory is this: There are use-cases where tiling windows (as in EXWM, which I normally use) annoy me. There are also use-cases where stacking windows (as in e.g. XFCE, which I tried for a bit) are annoying. Scrolling WMs are a new thing which is sort of similar to tiling, but as it adds more screen real estate doesn't require shuffling around or resizing of existing windows basically ever. I'm going to trial this (assuming I can get everything that's relevant for me set up) and see how it goes. Change-Id: I603c87b8ebd7fbde763d9d4708e098e9079889c5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12402 Tested-by: BuildkiteCI Reviewed-by: tazjin Autosubmit: tazjin --- users/tazjin/nixos/modules/desktop.nix | 46 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'users') diff --git a/users/tazjin/nixos/modules/desktop.nix b/users/tazjin/nixos/modules/desktop.nix index 296960a44345..22bec1c7d501 100644 --- a/users/tazjin/nixos/modules/desktop.nix +++ b/users/tazjin/nixos/modules/desktop.nix @@ -10,7 +10,6 @@ pulse.enable = true; }; - redshift.enable = true; blueman.enable = true; libinput.enable = true; @@ -19,34 +18,39 @@ xkb.layout = "us"; xkb.options = "caps:super"; - 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? + displayManager.sessionPackages = [ pkgs.niri ]; + displayManager.gdm = { + enable = true; + wayland = true; }; - - windowManager.session = lib.singleton { - name = "exwm"; - start = "${config.tazjin.emacs}/bin/tazjins-emacs --internal-border=0 --border-width=0"; - }; - desktopManager.xfce.enable = true; }; }; - # 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"; - _JAVA_AWT_WM_NONREPARENTING = "1"; - }; + programs.xwayland.enable = true; + + environment.systemPackages = with pkgs; [ + # core packages + niri + xwayland-satellite + swaylock + + # support tooling + qt5.qtwayland + sfwbar + swaybg + swayidle + wdisplays + wezterm + wl-mirror + xfce.xfce4-appfinder + ]; # Do not restart the display manager automatically systemd.services.display-manager.restartIfChanged = lib.mkForce false; + # swaylock needs an empty PAM configuration, otherwise it locks the user out + security.pam.services.swaylock = { }; + # If something needs more than 10s to stop it should probably be # killed. systemd.extraConfig = '' -- cgit 1.4.1