From b95fdb4cc1a255aeb2486c3a8d97bf57a8ca399b Mon Sep 17 00:00:00 2001 From: ska Date: Fri, 19 Dec 2025 23:50:35 +0000 Subject: [PATCH] Add hardware-configuration.nix --- hardware-configuration.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 hardware-configuration.nix diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..98cdde4 --- /dev/null +++ b/hardware-configuration.nix @@ -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; +} \ No newline at end of file