From ad5d0049cf0ef3bf983768f394320285f557823c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Thu, 7 Mar 2024 11:31:57 +0100 Subject: [PATCH] 97 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * --- modules/nixos/greetd.nix | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/modules/nixos/greetd.nix b/modules/nixos/greetd.nix index e725fa1..fe1d159 100644 --- a/modules/nixos/greetd.nix +++ b/modules/nixos/greetd.nix @@ -3,39 +3,17 @@ lib, pkgs, ... -}: let - swayConfig = pkgs.writeText "greetd-sway-config" '' - input * { - xkb_layout "de" - xkb_options "caps:ctrl_modifier" - xkb_numlock "enable" - } - input "type:touchpad" { - tap "enable" - natural_scroll "enable" - } - - exec dbus-sway-environment - exec configure-gtk - # `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. - exec "${pkgs.greetd.regreet}/bin/regreet -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 { - programs.regreet = { - enable = true; - }; +}: { + programs.regreet.enable = true; services.greetd = { enable = true; - settings = { - default_session = { - command = "${pkgs.sway}/bin/sway --config ${swayConfig}"; + settings = rec { + initial_session = { + command = "${pkgs.greetd.regreet}/bin/regreet"; + user = "max"; }; + default_session = initial_session; }; };