NixOS-Config/modules/system/desktop/sway/greetd/default.nix

36 lines
843 B
Nix

{ pkgs, ... }:
{
services = {
# Configure greetd for "auto" login (single user only)
greetd = {
enable = true;
restart = true;
settings = {
terminal = {
vt = 2;
switch = true;
};
default_session = {
command = ''
if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null; then
export LIBVA_DRIVER_NAME=nvidia
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export WLR_NO_HARDWARE_CURSORS=1
else
:
fi
export WLR_RENDERER=vulkan
export XDG_CURRENT_DESKTOP=sway
export QT_QPA_PLATFORM="wayland;xcb"
sway --unsupported-gpu
'';
user = "jimbo";
};
};
};
};
}