tvl-depot/users/tazjin/nixos/modules/desktop.nix
Vincent Ambo 609b68031b chore(3p/sources): bump channels & overlays (2024-09-01)
Included changes:

* users/aspen: explicitly use open-source nvidia driver

  This now has to be specified explicitly, otherwise evaluation fails with an
  error.
* users/aspen: nixfmt -> nixfmt-classic
* users/aspen: fixes for renamed packages & options
* users/tazjin: fixes for renamed packages & options
* 3p/overlays: remove cbtemulator patch (merged upstream)
* tvix/shell: remove unnecessary patches (merged upstream)
* 3p/rust-crates: mark libgit2_sys as broken
* users/Profpatsch: mark git-db as broken
* 3p/overlays: pick `mypaint` from stable channel
* tvix: fix comments that clippy doesn't like anymore
* tvix/glue: disable a misfiring clippy lint (applying its suggestion breaks
  code below)

Change-Id: I6d3fc027694bbe7425a2d25dc53d65467a44f3b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12403
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-05 20:56:31 +00:00

75 lines
1.7 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; # wayland doesn't work otherwise ...?!
displayManager.gdm = {
enable = true;
wayland = true;
};
};
};
services.displayManager.sessionPackages = [ pkgs.niri ];
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" ];
# 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 = "*";
};
# 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
'';
}