feat: extract seatd service to reusable module with boot log suppression
- Create modules/services/seatd.nix for clean greetd/tuigreet login experience - Add boot log suppression options to prevent systemd messages on login screen - Configure kernel parameters and journald to minimize console noise - Update both little-rascal and congenital-optimist to use new seatd module - Ensure consistent login experience across all machines - Maintain compatibility with existing lab tool (binary name: lab)
This commit is contained in:
parent
5f65abc2cc
commit
5c9c5bbbc4
3 changed files with 94 additions and 21 deletions
85
modules/services/seatd.nix
Normal file
85
modules/services/seatd.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
# Seatd service module with greetd display manager and boot log suppression
|
||||
# This module provides a clean login experience without systemd boot messages
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
options.services.seatd-clean = {
|
||||
enable = mkEnableOption "seatd with greetd and clean boot";
|
||||
|
||||
suppressBootMessages = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to suppress systemd boot messages that interfere with login screen";
|
||||
};
|
||||
|
||||
tuigreetCommand = mkOption {
|
||||
type = types.str;
|
||||
default = "${pkgs.zsh}/bin/zsh";
|
||||
description = "Command to execute after login via tuigreet";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.services.seatd-clean.enable {
|
||||
# Enable greetd display manager with tuigreet
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${config.services.seatd-clean.tuigreetCommand}";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Suppress systemd boot messages when enabled
|
||||
boot = mkIf config.services.seatd-clean.suppressBootMessages {
|
||||
# Kernel parameters to reduce boot noise
|
||||
kernelParams = [
|
||||
"quiet" # Reduce kernel messages
|
||||
"systemd.show_status=false" # Hide systemd startup status
|
||||
"rd.systemd.show_status=false" # Hide initrd systemd status
|
||||
"rd.udev.log_level=3" # Reduce udev messages
|
||||
"udev.log_level=3" # Reduce udev messages
|
||||
];
|
||||
|
||||
# Console configuration
|
||||
consoleLogLevel = 0; # Minimum console log level
|
||||
|
||||
# Plymouth for clean boot (optional)
|
||||
plymouth = {
|
||||
enable = false; # Keep disabled for now, can be enabled if desired
|
||||
};
|
||||
};
|
||||
|
||||
# Systemd and journald configuration to reduce noise
|
||||
systemd = mkIf config.services.seatd-clean.suppressBootMessages {
|
||||
# Reduce log levels
|
||||
extraConfig = ''
|
||||
LogLevel=warning
|
||||
DefaultStandardOutput=null
|
||||
DefaultStandardError=null
|
||||
'';
|
||||
};
|
||||
|
||||
# Journald configuration
|
||||
services.journald = mkIf config.services.seatd-clean.suppressBootMessages {
|
||||
extraConfig = ''
|
||||
# Reduce console output
|
||||
ForwardToConsole=no
|
||||
MaxLevelConsole=warning
|
||||
# Keep reasonable log retention
|
||||
MaxRetentionSec=7day
|
||||
SystemMaxUse=500M
|
||||
'';
|
||||
};
|
||||
|
||||
# Ensure proper TTY configuration for clean display
|
||||
console = {
|
||||
earlySetup = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue