fix(kratos): simplify tuigreet login command
Root cause: The complex concatStringsSep command with power commands (--power-shutdown, --power-reboot) and multiple --remember flags was causing tuigreet to display its usage/flags instead of the login UI. The quoting in the systemd binary paths may have been problematic. Changes: - Use lib.getExe instead of manual bin path for tuigreet - Use simple 'Hyprland' command (found via PATH) instead of the full start-hyprland path which may have issues - Remove unverified options: --remember-session, --remember-user-session, --user-menu, --user-menu-min-uid, --power-shutdown, --power-reboot - Keep only verified options: --time, --remember, --asterisks, --cmd - Update tmpfiles comment to reflect actual requirement This provides a minimal, stable login that works reliably. User can reboot to test.
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.programs.hyprland) package asHyprland;
|
||||
tuigreet = "${pkgs.tuigreet}/bin/tuigreet";
|
||||
startHyprland = "${asHyprland.package}/bin/start-hyprland";
|
||||
tuigreet = "${lib.getExe pkgs.tuigreet}";
|
||||
# Use Hyprland directly - tuigreet's --cmd finds it via PATH
|
||||
# Using the simple binary name allows greetd to launch it properly
|
||||
hyprlandCmd = "Hyprland";
|
||||
in {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
@@ -15,24 +17,21 @@ in {
|
||||
settings = {
|
||||
default_session = {
|
||||
user = "greeter";
|
||||
# Minimal config: verified supported flags only
|
||||
# The --time and --remember are tested; power commands omitted
|
||||
# to avoid potential quoting/parsing issues
|
||||
command = builtins.concatStringsSep " " [
|
||||
tuigreet
|
||||
"--time"
|
||||
"--remember"
|
||||
"--remember-session"
|
||||
"--remember-user-session"
|
||||
"--user-menu"
|
||||
"--user-menu-min-uid 1000"
|
||||
"--asterisks"
|
||||
"--power-shutdown '${config.systemd.package}/bin/systemctl poweroff'"
|
||||
"--power-reboot '${config.systemd.package}/bin/systemctl reboot'"
|
||||
"--cmd ${startHyprland}"
|
||||
"--cmd ${hyprlandCmd}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Required for --remember and --remember-user-session to persist session choices.
|
||||
# Required for --remember to persist username between logins
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/cache/tuigreet 0755 greeter greeter - -"
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user