configuration
flake
hosts
lib
modules
pkgs
profiles
common
common-dns
common-networking
cybercluster-vm
dn42-router
fem-net
hetzner-cloud
mercury-vm
netcup
network-fallback-dhcp
serial-console
default.nix
wg-clerie
default.nix
users
.gitignore
README.md
flake.lock
flake.nix
27 lines
478 B
Nix
27 lines
478 B
Nix
{ 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
|
|
";
|
|
|
|
};
|
|
}
|