From 6512669071fd664fcab0b0b36a8b5338178bc8b9 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Sat, 18 Jun 2022 01:27:40 +0100 Subject: [PATCH] nixos/colony: Extra hardware bits --- nixos/boxes/colony/default.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/nixos/boxes/colony/default.nix b/nixos/boxes/colony/default.nix index 1cb2fb7..92f4b42 100644 --- a/nixos/boxes/colony/default.nix +++ b/nixos/boxes/colony/default.nix @@ -41,8 +41,16 @@ }; boot = { + kernelPackages = pkgs.linuxKernel.packages.linux_5_15.extend (self: super: { + kernel = super.kernel.override { + structuredExtraConfig = with lib.kernel; { + #SOME_OPT = yes; + #A_MOD = module; + }; + }; + }); kernelModules = [ "kvm-amd" ]; - kernelParams = [ "amd_iommu=on" ]; + kernelParams = [ "amd_iommu=on" "console=ttyS0,115200n8" "console=ttyS1,115200n8" "console=tty0" ]; initrd = { availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; }; @@ -70,15 +78,28 @@ dmeventd.enable = true; }; netdata.enable = true; + + smartd = { + enable = true; + autodetect = true; + }; }; environment.systemPackages = with pkgs; [ pciutils + usbutils partclone lm_sensors + linuxPackages.cpupower + smartmontools ]; systemd = { + services = { + "serial-getty@ttyS0".enable = true; + "serial-getty@ttyS1".enable = true; + }; + network = { links = { "10-wan0" = {