profiles/serial-console: Add profile for serial console and enable on mercury VMs be default
This commit is contained in:
parent
c100f6e95b
commit
1d7eb45286
profiles
@ -13,6 +13,7 @@
|
||||
./mercury-vm
|
||||
./netcup
|
||||
./network-fallback-dhcp
|
||||
./serial-console
|
||||
./wg-clerie
|
||||
];
|
||||
|
||||
|
@ -11,6 +11,7 @@ with lib;
|
||||
config = mkIf config.profiles.clerie.mercury-vm.enable {
|
||||
|
||||
profiles.clerie.fem-net.enable = true;
|
||||
profiles.clerie.serial-console.enable = true;
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
|
26
profiles/serial-console/default.nix
Normal file
26
profiles/serial-console/default.nix
Normal 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
|
||||
";
|
||||
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user