forked from poz/niksos
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
|
{
|
||
|
config,
|
||
|
pkgs,
|
||
|
...
|
||
|
}: let
|
||
|
greeter = "gtkgreet";
|
||
|
|
||
|
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||
|
# https://github.com/swaywm/sway/issues/5732#issuecomment-1583336383
|
||
|
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
|
||
|
exec hash dbus-update-activation-environment 2>/dev/null && \
|
||
|
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
|
||
|
|
||
|
exec "${pkgs.greetd.${greeter}}/bin/${greeter} -l; swaymsg exit"
|
||
|
bindsym Mod4+shift+e exec swaynag \
|
||
|
-t warning \
|
||
|
-m 'What do you want to do?' \
|
||
|
-b 'Poweroff' 'systemctl poweroff' \
|
||
|
-b 'Reboot' 'systemctl reboot'
|
||
|
'';
|
||
|
in {
|
||
|
services.greetd = {
|
||
|
enable = true;
|
||
|
settings = {
|
||
|
default_session = {
|
||
|
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||
|
user = "jacek";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
environment.etc = {
|
||
|
"greetd/environments".text = ''
|
||
|
Hyprland
|
||
|
zsh
|
||
|
shutdown now
|
||
|
'';
|
||
|
};
|
||
|
}
|