diff --git a/configs/nixos/AGENTS.md b/configs/nixos/AGENTS.md index a1e2c3d..27dd8fa 100644 --- a/configs/nixos/AGENTS.md +++ b/configs/nixos/AGENTS.md @@ -46,3 +46,5 @@ Use a host-visible owner plus a shared group mode when the guest service can read the decrypted secret file through its group. - Pikachu deploys from the monorepo checkout copied to `~/dev`. Do not use the old `~/wrk/dotfiles` path for remote rebuild commands. +- Do not hand-author `hardware-configuration.nix` for a host that has not been generated on that machine. + Generate it on the target system or live ISO, then stage it before evaluating the flake. diff --git a/configs/nixos/hosts/zeus/default.nix b/configs/nixos/hosts/zeus/default.nix index 98bbca4..095fd2a 100644 --- a/configs/nixos/hosts/zeus/default.nix +++ b/configs/nixos/hosts/zeus/default.nix @@ -1,14 +1,12 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: # zeus — Ryzen desktop with AMD graphics. # Disk layout is in ./disk.nix. # `fileSystems` are derived from it, none declared here. { - imports = [ - ./hardware-configuration.nix - ./disk.nix - ]; + imports = [ ./disk.nix ] ++ lib.optional (builtins.pathExists ./hardware-configuration.nix) ./hardware-configuration.nix; system.stateVersion = "26.05"; + nixpkgs.hostPlatform = "x86_64-linux"; # systemd-boot on the EFI system partition. boot.loader.systemd-boot.enable = true; diff --git a/configs/nixos/hosts/zeus/hardware-configuration.nix b/configs/nixos/hosts/zeus/hardware-configuration.nix deleted file mode 100644 index 65c6e8d..0000000 --- a/configs/nixos/hosts/zeus/hardware-configuration.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, modulesPath, ... }: -# Hardware inferred from the CachyOS inventory for this desktop. -# disko derives `fileSystems` and the LUKS device, none declared here. -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = [ - "ahci" - "nvme" - "sd_mod" - "xhci_pci" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -}