27 lines
586 B
Nix
27 lines
586 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
greetdSwayConfig = pkgs.writeText "greetd-sway-config" ''
|
|
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -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 ${greetdSwayConfig}";
|
|
};
|
|
};
|
|
};
|
|
|
|
environment.etc."greetd/environments".text = ''
|
|
sway
|
|
'';
|
|
}
|