ark/modules/de/greetd/default.nix

32 lines
773 B
Nix
Raw Normal View History

2023-09-10 21:40:39 +03:00
{pkgs, ...}: let
run-sway = pkgs.writeText "run-sway.sh" ''
export _JAVA_AWT_WM_NONREPARENTING=1
export XDG_CURRENT_DESKTOP=sway
export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export GDK_BACKEND=wayland
export WLR_DRM_DEVICES=/dev/dri/card0
export WL_DRM_DEVICES=/dev/dri/card0
sway --unsupported-gpu
'';
in {
2022-10-22 23:54:44 +03:00
services.greetd = {
enable = true;
settings = {
terminal.vt = 1;
default_session = {
2023-09-10 21:40:39 +03:00
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --issue --time --cmd 'bash --login ${run-sway}'";
2022-10-22 23:54:44 +03:00
user = "greeter";
};
};
};
systemd.services = {
"getty@tty1".enable = false;
"autovt@tty1".enable = false;
};
}