From fb75cd9ec9f2763a65f158afaf30808de4f7484b Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 2 May 2024 19:00:26 -0400 Subject: [PATCH] greetd: fixed failure to start with blank initial_session --- nixosModules/desktop/greetd/default.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/nixosModules/desktop/greetd/default.nix b/nixosModules/desktop/greetd/default.nix index 0548d32a..24547a9c 100644 --- a/nixosModules/desktop/greetd/default.nix +++ b/nixosModules/desktop/greetd/default.nix @@ -29,18 +29,22 @@ services = { greetd = { enable = true; - settings = rec { - default_session = { - command = lib.mkDefault "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}"; - }; - initial_session = - if config.alyraffauf.desktop.greetd.autologin.enable - then { + settings = + if config.alyraffauf.desktop.greetd.autologin.enable + then { + default_session = { + command = lib.mkDefault "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}"; + }; + initial_session = { command = config.alyraffauf.desktop.greetd.session; user = config.alyraffauf.desktop.greetd.autologin.user; - } - else {}; - }; + }; + } + else { + default_session = { + command = lib.mkDefault "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}"; + }; + }; }; }; };