From 8a1b615f3af279f2c10024af2d2460cdc4db9c7a Mon Sep 17 00:00:00 2001 From: Polen Date: Thu, 5 Jun 2025 23:56:19 -0400 Subject: [PATCH] fuck disko --- devices/server/configuration.nix | 4 +--- devices/server/hardware-configuration.nix | 28 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 devices/server/hardware-configuration.nix diff --git a/devices/server/configuration.nix b/devices/server/configuration.nix index 37650d0..00898ed 100644 --- a/devices/server/configuration.nix +++ b/devices/server/configuration.nix @@ -4,15 +4,13 @@ ... }: { imports = [ - # Include the results of the hardware scan. - ./disk-config.nix ]; boot.loader = { grub = { enable = true; version = 2; - device = "/dev/sda"; + devices = ["/dev/sda"]; }; }; diff --git a/devices/server/hardware-configuration.nix b/devices/server/hardware-configuration.nix new file mode 100644 index 0000000..c129ae1 --- /dev/null +++ b/devices/server/hardware-configuration.nix @@ -0,0 +1,28 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "hpsa" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0f1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0f1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}