dot-nixos/system/services/greetd.nix
Tim Peters d249a9dbb6 Gen 1
2024-03-05 22:05:40 +01:00

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
'';
}