From 789d2c43a68e4a47361510f39f46f509ea90107d Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 30 Aug 2024 18:47:36 +0200 Subject: [PATCH] fix: add hardware config --- hosts/muos/configuration.nix | 1 + hosts/muos/hardware-configuration.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 hosts/muos/hardware-configuration.nix diff --git a/hosts/muos/configuration.nix b/hosts/muos/configuration.nix index b02bdf4..60307dc 100644 --- a/hosts/muos/configuration.nix +++ b/hosts/muos/configuration.nix @@ -10,6 +10,7 @@ ../../modules/games/steam.nix ../../modules/plasma ./disk-config.nix + ./hardware-configuration.nix ../../common ]; diff --git a/hosts/muos/hardware-configuration.nix b/hosts/muos/hardware-configuration.nix new file mode 100644 index 0000000..8fb4869 --- /dev/null +++ b/hosts/muos/hardware-configuration.nix @@ -0,0 +1,26 @@ +# 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 = [ "nvme" "xhci_pci" "ahci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + 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.enp42s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}