Begin the move to the import all, activate by config model
This commit is contained in:
parent
7397b614de
commit
07cb2d67a2
97 changed files with 776 additions and 633 deletions
33
modules/system/programs/sway/greetd/default.nix
Normal file
33
modules/system/programs/sway/greetd/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Configure greetd for login directly to Sway
|
||||
services.greetd = let
|
||||
startSway = pkgs.writeScript "startsway" ''
|
||||
if ${pkgs.pciutils}/bin/lspci -k | grep "in use: nvidia" &> /dev/null; then
|
||||
export LIBVA_DRIVER_NAME=nvidia
|
||||
export GBM_BACKEND=nvidia-drm
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export QT_QPA_PLATFORM="wayland;xcb"
|
||||
|
||||
sway --unsupported-gpu
|
||||
'';
|
||||
in {
|
||||
enable = config.system.desktop.enable;
|
||||
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