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
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
../../modules/services/nfs-client.nix
|
../../modules/services/nfs-client.nix
|
||||||
|
../../modules/services/seatd.nix
|
||||||
|
|
||||||
# Desktop environments
|
# Desktop environments
|
||||||
../../modules/desktop/common.nix
|
../../modules/desktop/common.nix
|
||||||
|
@ -60,16 +61,8 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Display manager - use greetd instead of cosmic-greeter
|
# Enable clean seatd/greetd login
|
||||||
services.greetd = {
|
services.seatd-clean.enable = true;
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${pkgs.zsh}/bin/zsh";
|
|
||||||
user = "greeter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# ZFS services for this machine
|
# ZFS services for this machine
|
||||||
services.zfs = {
|
services.zfs = {
|
||||||
|
|
|
@ -46,6 +46,9 @@
|
||||||
|
|
||||||
# Security
|
# Security
|
||||||
../../modules/security/ssh-keys.nix
|
../../modules/security/ssh-keys.nix
|
||||||
|
|
||||||
|
# Services
|
||||||
|
../../modules/services/seatd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
@ -90,21 +93,13 @@
|
||||||
|
|
||||||
# Laptop-specific services
|
# Laptop-specific services
|
||||||
services = {
|
services = {
|
||||||
|
# Enable clean seatd/greetd login
|
||||||
|
seatd-clean.enable = true;
|
||||||
|
|
||||||
# Power management for laptop
|
# Power management for laptop
|
||||||
power-profiles-daemon.enable = true;
|
power-profiles-daemon.enable = true;
|
||||||
upower.enable = true;
|
upower.enable = true;
|
||||||
|
|
||||||
# Display manager
|
|
||||||
greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${pkgs.zsh}/bin/zsh";
|
|
||||||
user = "greeter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Essential services
|
# Essential services
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
|
|
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