From c8316cfc70b1ff510250030789808dd7b623b5ae Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sun, 24 Dec 2023 17:40:47 +0100 Subject: [PATCH] defiant: add hardware config --- hosts/defiant/configuration.nix | 2 +- hosts/defiant/hardware-configuration.nix | 33 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 hosts/defiant/hardware-configuration.nix diff --git a/hosts/defiant/configuration.nix b/hosts/defiant/configuration.nix index 9401246..9e6548d 100644 --- a/hosts/defiant/configuration.nix +++ b/hosts/defiant/configuration.nix @@ -11,7 +11,7 @@ networking = { hostName = "defiant"; defaultGateway = "192.168.10.1"; - interfaces.eno1.ipv4 = { + interfaces.enp3s0.ipv4 = { addresses = [ { address = "192.168.10.175"; prefixLength = 24; } ]; diff --git a/hosts/defiant/hardware-configuration.nix b/hosts/defiant/hardware-configuration.nix new file mode 100644 index 0000000..48638cd --- /dev/null +++ b/hosts/defiant/hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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 = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/45ceae6b-cf6d-42d6-9694-d14c1d42b49f"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/DDDC-5C0C"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + networking.useDHCP = lib.mkDefault false; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}