What a clusterfuck
This commit is contained in:
parent
91f88b8bb2
commit
f29273be22
221 changed files with 779 additions and 956 deletions
37
modules/system/desktop/sway/greetd/default.nix
Normal file
37
modules/system/desktop/sway/greetd/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
# Configure greetd for "auto" login (single user only)
|
||||
greetd = let
|
||||
startSway = pkgs.writeScript "startsway" ''
|
||||
# Use NVIDIA variables if drivers are in use
|
||||
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 XDG_CURRENT_DESKTOP=sway
|
||||
export QT_QPA_PLATFORM="wayland;xcb"
|
||||
|
||||
sway --unsupported-gpu
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
restart = true;
|
||||
settings = {
|
||||
terminal = {
|
||||
vt = 2;
|
||||
switch = true;
|
||||
};
|
||||
default_session = {
|
||||
command = "${startSway}";
|
||||
user = "jimbo";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue