tvl-depot/users/tazjin/nixos/modules/desktop.nix
Vincent Ambo a9403664e1 fix(tazjin/nixos): always start pipewire before niri
According to discussions in the Niri issue tracker, pipewire must be started
before niri in order for screen sharing to work. Why? No idea.

Change-Id: Id4ff890dd2536b3cc98b14992cd799d257eec9be
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12431
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-03 22:34:13 +00:00

67 lines
1.5 KiB
Nix

# EXWM and other desktop configuration.
{ config, depot, lib, pkgs, ... }:
{
services = {
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
blueman.enable = true;
libinput.enable = true;
xserver = {
enable = true;
xkb.layout = "us";
xkb.options = "caps:super";
displayManager.sessionPackages = [ pkgs.niri ];
displayManager.gdm = {
enable = true;
wayland = true;
};
};
};
programs.xwayland.enable = true;
environment.systemPackages = with pkgs; [
# core packages
niri
xwayland-satellite
swaylock
# support tooling
alacritty
qt5.qtwayland
sfwbar
swayidle
waybar
wdisplays
wl-mirror
xfce.xfce4-appfinder
];
# Do not restart the display manager automatically
systemd.services.display-manager.restartIfChanged = lib.mkForce false;
# 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" ];
# swaylock needs an empty PAM configuration, otherwise it locks the user out
security.pam.services.swaylock = { };
# enable theming support for Qt that is compatible with Chicago95 theme
qt.enable = true;
qt.platformTheme = "qt5ct";
# If something needs more than 10s to stop it should probably be
# killed.
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
'';
}