From 80c9a447a1e8aea3be9b52a4024cbd985657adc2 Mon Sep 17 00:00:00 2001 From: Porta Date: Sat, 10 Oct 2026 21:46:33 +1000 Subject: [PATCH] hardware config --- README.md | 2 +- hardware-configuration.nix | 4 ++++ modules/system/hosts/fractal/default.nix | 17 +++-------------- 3 files changed, 8 insertions(+), 15 deletions(-) create mode 100644 hardware-configuration.nix diff --git a/README.md b/README.md index 01c5fc1..6446384 100755 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ _Declarative NixOS configuration with Flakes & Home Manager_
The `fractal` host targets Porta's MSI MS-7C95 desktop (AMD Ryzen 5 5500, NVIDIA GeForce RTX 5060 Ti, Intel Wireless-AC 3168 Wi-Fi/Bluetooth, and x86_64 UEFI). It enables the Niri/Noctalia desktop, terminal tools, gaming, and multimedia modules. The configured displays are HDMI-A-1 at 1920×1080/180 Hz and DP-2 at 1920×1080/60 Hz. -The host configuration does not select or partition a disk. Before installing NixOS, decide which drive and filesystem to use, generate its filesystem configuration, and add the resulting UUIDs to the `fractal-hardware` module. This machine currently runs Arch Linux, so the profile has not been installed or switched on the running system. +The host configuration does not select or partition a disk. Before installing NixOS, decide which drive and filesystem to use. After mounting the target at `/mnt` and cloning this repository to `/mnt/etc/nixos`, run `nixos-generate-config --root /mnt --force`. This replaces the tracked root-level `hardware-configuration.nix` placeholder with detected hardware, filesystem, and UUID settings; the `fractal-hardware` module imports it automatically. This machine currently runs Arch Linux, so the profile has not been installed or switched on the running system. The account is configured as `porta` and uses the local Git identity. No login password is stored in the Nix configuration; after mounting the installed system at `/mnt`, set one before the first normal login with `nixos-enter --root /mnt -c 'passwd porta'`. diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..fde8444 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,4 @@ +# Replaced by `nixos-generate-config --root /mnt --force` during installation. +# Keep this tracked placeholder so the flake can import the generated file. +{ ... }: +{ } diff --git a/modules/system/hosts/fractal/default.nix b/modules/system/hosts/fractal/default.nix index 4d95249..80eef27 100644 --- a/modules/system/hosts/fractal/default.nix +++ b/modules/system/hosts/fractal/default.nix @@ -118,22 +118,11 @@ }; flake.nixosModules.fractal-hardware = - { modulesPath, ... }: + { ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "nvme" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.kernelModules = [ "kvm-amd" ]; + # This tracked root-level file is populated by nixos-generate-config. + imports = [ ../../../../hardware-configuration.nix ]; boot.supportedFilesystems = [ "btrfs" ]; - - # Add fileSystems and swapDevices here once the NixOS target layout is chosen. }; }