From 8b380261caffd5ae4678f50cd9014aa583a682e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Krop=C3=A1=C4=8Dek?= Date: Sun, 22 Sep 2024 23:53:50 +0200 Subject: [PATCH] added hw-conf --- flake.nix | 1 - hosts/lenar/default.nix | 2 ++ hosts/lenar/hardware-configuration.nix | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 hosts/lenar/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index f9b403d..e5244e9 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,6 @@ modules = [ ./hosts/lenar ./hosts/base - inputs.disko.nixosModules.disko ]; specialArgs = { inherit inputs; diff --git a/hosts/lenar/default.nix b/hosts/lenar/default.nix index 5815b2a..01a4b3c 100644 --- a/hosts/lenar/default.nix +++ b/hosts/lenar/default.nix @@ -8,6 +8,8 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + inputs.disko.nixosModules.disko + ./disko.nix ]; networking.hostName = "lenar"; # Define your hostname. diff --git a/hosts/lenar/hardware-configuration.nix b/hosts/lenar/hardware-configuration.nix new file mode 100644 index 0000000..39024d8 --- /dev/null +++ b/hosts/lenar/hardware-configuration.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + 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.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} \ No newline at end of file