From 080d964f31303f7019a564f81f75835ad2f379ea Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 18 Nov 2024 17:56:45 +0800 Subject: [PATCH] hosts/ni: update hardware configuration --- configs/nixos/ni/disko.nix | 2 +- configs/nixos/ni/hardware-configuration.nix | 14 +++----------- configs/nixos/ni/modules/networking/setup.nix | 15 +++++++++++---- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/configs/nixos/ni/disko.nix b/configs/nixos/ni/disko.nix index 836bf1a1..8180932e 100644 --- a/configs/nixos/ni/disko.nix +++ b/configs/nixos/ni/disko.nix @@ -2,7 +2,7 @@ { disko.devices = { - disk.primary = { + disk."${config.hostname}-primary" = { device = disk; type = "disk"; content = { diff --git a/configs/nixos/ni/hardware-configuration.nix b/configs/nixos/ni/hardware-configuration.nix index 2c5c51d0..e6565dfd 100644 --- a/configs/nixos/ni/hardware-configuration.nix +++ b/configs/nixos/ni/hardware-configuration.nix @@ -5,9 +5,9 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "uas" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; # Use the systemd-boot EFI boot loader. @@ -18,14 +18,6 @@ boot.loader.efi.canTouchEfiVariables = true; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - boot.initrd.services.udev.rules = '' - KERNELS=="input0", SUBSYSTEMS=="input", ATTRS{id/product}=="0001", ATTRS{id/vendor}=="0001", ATTRS{id/version}=="ab83", ENV{LIBINPUT_IGNORE_DEVICE}="1" - ''; - - services.udev.extraRules = '' - KERNELS=="input0", SUBSYSTEMS=="input", ATTRS{id/product}=="0001", ATTRS{id/vendor}=="0001", ATTRS{id/version}=="ab83", ENV{LIBINPUT_IGNORE_DEVICE}="1" - ''; } diff --git a/configs/nixos/ni/modules/networking/setup.nix b/configs/nixos/ni/modules/networking/setup.nix index df43bd4e..981a495a 100644 --- a/configs/nixos/ni/modules/networking/setup.nix +++ b/configs/nixos/ni/modules/networking/setup.nix @@ -104,14 +104,20 @@ in # Setting up our network manager of choice. systemd.network.enable = true; - # Setting up the bond devices. + # Setting up the bond devices. So far it should have 2 Ethernet ports and + # one WiFi interface so it should be bond composed of three interfaces. systemd.network.networks."40-bond1-dev1" = { - matchConfig.Name = "enp1s0"; + matchConfig.Name = "enp3s0"; + networkConfig.Bond = "bond1"; + }; + + systemd.network.networks."40-bond1-dev3" = { + matchConfig.Name = "enp2s0"; networkConfig.Bond = "bond1"; }; systemd.network.networks."40-bond1-dev2" = { - matchConfig.Name = "wlp2s0"; + matchConfig.Name = "wlp4s0"; networkConfig = { Bond = "bond1"; IgnoreCarrierLoss = "15"; @@ -123,6 +129,7 @@ in Name = "bond1"; Kind = "bond"; }; + systemd.network.networks."40-bond1" = { matchConfig.Name = "bond1"; networkConfig.DHCP = "yes"; @@ -154,7 +161,7 @@ in miimon = "100"; mode = "active-backup"; }; - interfaces = [ "enp1s0" "wlp2s0" ]; + interfaces = [ "enp2s0" "enp3s0" "wlp4s0" ]; }; })