From 210ed38295d1f57930852b5de5187e80b6baaf71 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 27 Dec 2024 16:11:25 +0100 Subject: [PATCH] nixos/services/greetd: switch back to gtkgreet, conditionally toggle compositors in greetd/environments --- config/nixos/services/greetd.nix | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/config/nixos/services/greetd.nix b/config/nixos/services/greetd.nix index d0dfe02..69b5615 100644 --- a/config/nixos/services/greetd.nix +++ b/config/nixos/services/greetd.nix @@ -13,11 +13,9 @@ let hyprctl = getExe' hyprland "hyprctl"; Hyprland = getExe' hyprland "Hyprland"; - greeter = getExe config.programs.regreet.package; + greeter = getExe pkgs.greetd.gtkgreet; - hyprlandConfig = let - cfg = config.local.style; - in + hyprlandConfig = pkgs.writeText "greetd-hyprland-config" '' misc { @@ -32,7 +30,7 @@ let workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false - exec-once=[workspace 1;fullscreen;noanim] ${greeter}; ${hyprctl} dispatch exit + exec-once=[workspace 1;fullscreen;noanim] ${greeter} -l; ${hyprctl} dispatch exit exec-once=${hyprctl} dispatch focuswindow ${greeter} ''; in { @@ -56,4 +54,17 @@ in { gdm-password.enableGnomeKeyring = true; greetd.fprintAuth = false; }; + + environment.etc."greetd/environments".text = lib.strings.concatStringsSep "\n" [ + (lib.optionalString + config.programs.hyprland.enable + ( + if config.programs.hyprland.withUWSM + then "uwsm start -S hyprland-uwsm.desktop" + else "Hyprland" + )) + (lib.optionalString + config.programs.sway.enable + "sway") + ]; }