Skip to content

Commit

Permalink
hosts/ni: update hardware configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
foo-dogsquared committed Nov 18, 2024
1 parent 78231a5 commit 080d964
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion configs/nixos/ni/disko.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
disko.devices = {
disk.primary = {
disk."${config.hostname}-primary" = {
device = disk;
type = "disk";
content = {
Expand Down
14 changes: 3 additions & 11 deletions configs/nixos/ni/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
'';
}
15 changes: 11 additions & 4 deletions configs/nixos/ni/modules/networking/setup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -123,6 +129,7 @@ in
Name = "bond1";
Kind = "bond";
};

systemd.network.networks."40-bond1" = {
matchConfig.Name = "bond1";
networkConfig.DHCP = "yes";
Expand Down Expand Up @@ -154,7 +161,7 @@ in
miimon = "100";
mode = "active-backup";
};
interfaces = [ "enp1s0" "wlp2s0" ];
interfaces = [ "enp2s0" "enp3s0" "wlp4s0" ];
};
})

Expand Down

0 comments on commit 080d964

Please sign in to comment.