1
0

profiles/serial-console: Add profile for serial console and enable on mercury VMs be default

This commit is contained in:
2025-03-23 14:30:17 +01:00
parent c100f6e95b
commit 1d7eb45286
3 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.profiles.clerie.serial-console;
in {
options.profiles.clerie.serial-console = {
enable = mkEnableOption "Use first serial console as termial";
};
config = mkIf cfg.enable {
boot.kernelParams = [ "console=ttyS0,115200n8" ];
boot.loader.grub.extraConfig = "
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
terminal_input serial
terminal_output serial
";
};
}