Unverified Commit 7f4cfd66 authored by isabel's avatar isabel Committed by GitHub
Browse files

nixos/greetd: avoid systemd boot messages interrupt greetd (#433962)

parents 00338576 1ee66ce8
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -59,6 +59,16 @@ in
        because every greetd restart will trigger the autologin again.
      '';
    };

    useTextGreeter = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = ''
        Whether the greeter uses text-based user interfaces (For example, tuigreet).

        When set to true, some systemd service configuration will be adjusted to avoid systemd boot messages interrupt TUI.
      '';
    };
  };
  config = lib.mkIf cfg.enable {

@@ -108,7 +118,19 @@ in
        KeyringMode = "shared";

        Type = "idle";
      };
      }
      // (lib.optionalAttrs cfg.useTextGreeter {
        StandardInput = "tty";
        StandardOutput = "tty";
        # Without this errors will spam on screen
        StandardError = "journal";

        # Without these bootlogs will spam on screen
        TTYPath = "/dev/tty1";
        TTYReset = true;
        TTYVHangup = true;
        TTYVTDisallocate = true;
      });

      # Don't kill a user session when using nixos-rebuild
      restartIfChanged = false;