dotfiles/hardware-configuration.nix
Mads Fagerlund 64a399597a
plain: one x86_64 target, no host branching
Drops the mbp (Asahi) target and everything that existed only to serve
two machines at once:

  - apple-silicon input, firmware/ (87M of Mac Wi-Fi/BT blobs), hosts/mbp/
  - the mkHost helper and the common-vs-host-module split, merged into one
    `pc` module
  - the osConfig.networking.hostName conditional that generated
    hypr/monitors.conf per host -- the monitor layout, workspace placement
    and panel float rule are now stated once, inline in hyprland.conf
  - the aarch64 nixbuild.net builder and the aarch64 devShell
  - Mac-only hyprland bits: the apple-spi-keyboard device block and the
    touchpad input block

hosts/pc/hardware-configuration.nix moves to the repo root: with one
machine there is no host to namespace it under. The flake output stays
named `pc` so it matches networking.hostName, which means plain
`nixos-rebuild switch --flake ~/nixos` resolves it with no #target.

eww goes too. It only ever drew a battery popup (SUPER+R), and a battery
readout on a desktop with no battery is nothing.

Also fixes the services.logind.suspendKey/hibernateKey/lidSwitch rename
that eval has been warning about; the rendered logind.conf keeps the same
three Handle*=ignore directives.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-10 19:34:53 +02:00

28 lines
896 B
Nix

# Generic x86_64 UEFI hardware profile — boots on most machines WITHOUT
# per-machine `nixos-generate-config`, as long as you format the disks with the
# labels `nixos` (root) and `BOOT` (ESP).
#
# `availableKernelModules` covers NVMe + SATA/AHCI + USB boot. An exotic storage
# controller could need one more entry — check with:
# nixos-generate-config --show-hardware-config
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "vmd"
];
hardware.enableRedistributableFirmware = true; # wifi/gpu firmware for arbitrary hw
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
swapDevices = [ ];
}