{
  config,
  lib,
  ...
}:
let
  cfg = config.silentBoot;
in
{
  options.silentBoot = {
    enable = lib.mkEnableOption "silent boot (quiet kernel, hidden boot menu)";
  };

  config = lib.mkIf cfg.enable {
    boot.consoleLogLevel = 0;
    boot.initrd.verbose = false;
    boot.kernelParams = [
      "quiet"
      "splash"
      "boot.shell_on_fail"
      "loglevel=3"
      "rd.systemd.show_status=false"
      "rd.udev.log_level=3"
      "udev.log_priority=3"
    ];
    boot.loader.timeout = lib.mkDefault 1;
  };
}
