Add hardware-configuration.nix
This commit is contained in:
24
hardware-configuration.nix
Normal file
24
hardware-configuration.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Enable modules that help with diverse hardware
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# Avoid hardcoding any filesystems—assume root is found by label or not needed
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/NIXOS_USB"; # ← use a consistent label
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Optional: disable swap if not using it (USB + swap = wear)
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Let NixOS auto-detect GPU, network, etc.
|
||||||
|
services.xserver.videoDrivers = [ ]; # auto-detected
|
||||||
|
|
||||||
|
# Ensure firmware for common hardware is included
|
||||||
|
hardware.enableAllFirmware = true;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user