iron: generate hardware-configuration

This commit is contained in:
Primrose 2025-10-23 11:41:25 +08:00
parent 9aafa0207c
commit aaa3159a31
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 6 additions and 8 deletions

View file

@ -30,7 +30,7 @@ This repo is managed with Nix + GNU stow
disko -m disko ./disko.nix # format the drive disko -m disko ./disko.nix # format the drive
# optional for unknown hard ware # optional for unknown hard ware
nixos-generate-config --no-filesystems --root /mnt --dir . # disko will take care of the file system configuration nixos-generate-config --no-filesystems --dir . # disko will take care of the file system configuration
# put the generated config in the right path and import it # put the generated config in the right path and import it
nixos-install --flake .dotfiles#<hostname> nixos-install --flake .dotfiles#<hostname>

View file

@ -12,9 +12,9 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt"]; boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "uas" "sd_mod" "sr_mod" "sdhci_pci"];
boot.initrd.kernelModules = ["dm-snapshot"]; boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -22,11 +22,9 @@
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp195s0f4u1u4.useDHCP = lib.mkDefault true; # networking.interfaces.wlp3s0b1.useDHCP = lib.mkDefault true;
# networking.interfaces.vboxnet0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }