From 0dc2ab93b6b6b5bb14a4720662dbc22ce78e3233 Mon Sep 17 00:00:00 2001 From: Ashhhleyyy Date: Mon, 2 Oct 2023 19:20:14 +0100 Subject: [PATCH] feat(alex): use actual hardware-config --- hosts/alex/configuration.nix | 2 +- hosts/alex/hardware-config.nix | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 hosts/alex/hardware-config.nix diff --git a/hosts/alex/configuration.nix b/hosts/alex/configuration.nix index 5e8808d..b88398a 100644 --- a/hosts/alex/configuration.nix +++ b/hosts/alex/configuration.nix @@ -1,8 +1,8 @@ { config, pkgs, ... }: { imports = [ - ../../common/generic-qemu.nix ../../common/generic.nix ../../common/generic-desktop.nix + ./hardware-config.nix ]; networking.hostName = "alex"; diff --git a/hosts/alex/hardware-config.nix b/hosts/alex/hardware-config.nix new file mode 100644 index 0000000..ba2e318 --- /dev/null +++ b/hosts/alex/hardware-config.nix @@ -0,0 +1,37 @@ +# 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" "ehci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/de284e37-e327-44d2-a363-3d646bd36553"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/61F6-B715"; + fsType = "vfat"; + }; + swapDevices = [ ]; + + # 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.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}