laptop-config/docs/T490-OFFLOADING.md
Scott Scoble 5051dfdc8c Add T490 hardware configuration and docs
- modules/t490.nix: TLP power management, CPU throttling (throttled), S3 sleep,
  remote Nix builders (cluster), fwupd, fprintd, fprintd, Syncthing, Tailscale,
  Intel VA-API, TrackPoint sensitivity, PipeWire defaults
- flake.nix: add nixos-hardware input, import T490 module + nixos-hardware
- docs/T490-HARDWARE.md: WiFi variants, graphics, audio, fingerprint, sleep guide
- docs/T490-BATTERY.md: TLP config, threshold strategy, real-world battery numbers
- docs/T490-OFFLOADING.md: local vs cluster split, remote builder setup
- MIGRATION.md: add T490 post-install steps (fwupd, fprint, remote build key)
- README.md: reflect new module and docs structure
2026-05-14 17:40:04 -07:00

1.6 KiB

T490 Offloading Strategy

The k3s cluster (n97, n97-mini) handles CPU-bound work so the T490 stays cool and battery lasts longer.

Local (T490)

Interactive, latency-sensitive, or IO-bound:

  • Firefox (web apps, research)
  • Terminal + shell (ghostty + zellij)
  • Editor (nvim)
  • kubectl / k9s (just API calls)
  • git on small repos
  • nixos-rebuild switch (builds go remote, CLI runs locally)
  • SSH client
  • Chat (Signal, Discord)
  • Obsidian
  • Image/document viewing

Cluster

CPU-bound, batch, or service workloads:

  • Heavy Nix derivations during nixos-rebuild → remote builders
  • Go/Rust/C compilation → ssh/rsync build remotely
  • Docker/OCI image builds → build where they run
  • Package builds (CI) → Forgejo runners on cluster
  • Data processing, ETL
  • Kubeclaw agent operations
  • Long-running services (Forgejo, registry, web services)

Remote Nix Builders

Configured in modules/t490.nix:

nix.distributedBuilds = true;
nix.buildMachines = [
  { hostName = "n97-mini"; system = "x86_64-linux"; maxJobs = 4; ... }
  { hostName = "n97";      system = "x86_64-linux"; maxJobs = 4; ... }
];

Setup: ssh-keygen -t ed25519 -f /root/.ssh/remote-build on T490, copy pubkey to each builder.

When it works: nixos-rebuild switch --flake .#laptop ships heavy derivations to the cluster. The T490 only builds what must be local (bootloader, activation scripts).

Dev Compilation Patterns

  • sshfs mount: Edit locally, files live on cluster → build via SSH
  • rsync + remote build: Push source, build, pull binary back
  • nix develop with builders: nix develop .#project --builders "ssh://n97-mini"