diff --git a/.claude/tasks/0013-nixos-hardware-profile.md b/.claude/tasks/0013-nixos-hardware-profile.md index 512427e..c17d6a0 100644 --- a/.claude/tasks/0013-nixos-hardware-profile.md +++ b/.claude/tasks/0013-nixos-hardware-profile.md @@ -10,9 +10,36 @@ The microcode setting the `Host` currently declares is dropped, because the prof ## Acceptance criteria -- [ ] `nixos-hardware` is a flake input -- [ ] The Dell XPS 13 9380 profile is imported by the `neogaia` `Host` -- [ ] The `Host`'s own Intel microcode setting is removed, now that the profile supplies it -- [ ] `nix flake check` builds the `neogaia` toplevel +- [x] `nixos-hardware` is a flake input +- [x] The Dell XPS 13 9380 profile is imported by the `neogaia` `Host` +- [x] The `Host`'s own Intel microcode setting is removed, now that the profile supplies it +- [x] `nix flake check` builds the `neogaia` toplevel - [ ] Manual confirmation after a rebuild: the default sleep mode is deep rather than s2idle - [ ] Manual confirmation after a rebuild: the thermal and power management services are active, and the PS/2 mouse driver is no longer loaded + +## Implementation Notes + +The two manual criteria are left unresolved deliberately, and this task is not +finished until the operator resolves them. Both require a `nixos-rebuild switch` +followed by a **reboot**, neither of which can be performed here: the rebuild +needs root, and the sleep-mode and module-blacklist changes only take effect on a +fresh boot rather than on activation, since the modules in question are already +loaded. + +The strongest evidence obtainable short of that reboot was gathered from the +evaluated configuration, and all of it agrees with the intent: the deep-sleep +kernel parameter is present, the PS/2 mouse module is blacklisted, the thermal, +power and firmware services are enabled, and Intel microcode updates remain on +through the profile's default now that the `Host` no longer sets them. That +confirms what was built, not what the machine does. + +The input follows the base nixpkgs. Locking it without that pulled a second +nixpkgs into the lock file, which nothing evaluates — only the NixOS modules are +consumed — and which would drift silently. Following matches every other input +here except chaotic, whose separate pin is deliberate. + +Verify after rebooting: + + cat /sys/power/mem_sleep # expect [deep], currently [s2idle] deep + systemctl is-active thermald tlp # expect active, currently inactive + lsmod | grep psmouse # expect no output, currently loaded diff --git a/flake.lock b/flake.lock index c43e809..403f7a0 100644 --- a/flake.lock +++ b/flake.lock @@ -117,6 +117,26 @@ "type": "github" } }, + "nixos-hardware": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784310968, + "narHash": "sha256-rkSPTePrKqs4dg+i7ZFCq93+HrClac6oSwXX927SVjA=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "779c32a00155994c86cde8213a8dd4df139d4355", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1784120854, @@ -208,6 +228,7 @@ "chaotic": "chaotic", "disko": "disko", "home-manager": "home-manager_2", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index 5b92014..8203cad 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # Upstream per-machine hardware profiles; each host imports its own. + nixos-hardware = { + url = "github:NixOS/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # CachyOS kernel and binary cache. Pins its own nixpkgs so its cache stays # usable and the kernel is fetched from it. chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; diff --git a/hosts/neogaia/default.nix b/hosts/neogaia/default.nix index 0eb0791..cd6e22f 100644 --- a/hosts/neogaia/default.nix +++ b/hosts/neogaia/default.nix @@ -1,8 +1,9 @@ -{ pkgs, ... }: +{ inputs, pkgs, ... }: # neogaia — Dell XPS 13 9380 laptop. # Disk layout is in ./disk.nix; `fileSystems` are derived from it, none declared here. { imports = [ + inputs.nixos-hardware.nixosModules.dell-xps-13-9380 ./hardware-configuration.nix ./disk.nix ]; @@ -15,9 +16,8 @@ boot.kernelPackages = pkgs.linuxPackages_cachyos; - hardware.cpu.intel.updateMicrocode = true; - # Redistributable firmware for the QCA6174 wifi (ath10k blobs). + # Intel microcode updates follow from this; none declared here. hardware.enableRedistributableFirmware = true; # RAM-backed swap; no on-disk swap partition.