From a6fd893cbbb3e97710f9b1bfea80ac0a4151561b Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Wed, 11 Nov 2026 20:33:15 +0800 Subject: [PATCH] refactor(aquamarine): move the whisper-asr module into asr/ Assisted-by: DeepSeek Harness (claude-opus-5-5) --- docs/WORKAROUNDS.md | 16 ++++++++-------- hosts/idols-aquamarine/README.md | 2 +- .../{asr.nix => asr/default.nix} | 2 +- hosts/idols-aquamarine/default.nix | 2 +- hosts/idols-aquamarine/hardware-intel-cpu.nix | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) rename hosts/idols-aquamarine/{asr.nix => asr/default.nix} (98%) diff --git a/docs/WORKAROUNDS.md b/docs/WORKAROUNDS.md index b08d8eba..32cb07fe 100644 --- a/docs/WORKAROUNDS.md +++ b/docs/WORKAROUNDS.md @@ -16,14 +16,14 @@ obsolete workarounds get rolled back instead of lingering. A version or revision pinned for a reason that can go away. -| ID | What & where | Why | Removal condition | Added | Revisit | Status | -| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------- | ------ | -| WA-004 | `catppuccin` on `main` — `flake.nix` | `main` carries the nodejs→nodejs-slim deprecation fix, which is not in a release | Switch to a release tag once it includes the fix | 2026-09-25 | on catppuccin release | active | -| WA-006 | `nixpkgs-blender` — `flake.nix` | Blender 5.2 LTS + CUDA/OptiX pin; keeps `just up` from triggering a full source rebuild | Bump deliberately when needed; drop the pin if the current nixpkgs build is acceptable | 2026-07-24 | deliberate | active | -| WA-020 | `fcitx5-vinput` pinned to release tag `v2.4.2` — `flake.nix`; consumer `home/linux/gui/base/vinput/default.nix` | Tracks a release tag instead of a branch, so `just up` stays on that release | Bump to a newer release tag when its changes are wanted | 2026-10-04 | on vinput release | active | -| WA-021 | `nix-x86-on-aarch64` input — our fork of rowanG077's patched FEX + muvm runtime — `flake.nix`; `hosts/12kingdoms-shoukei/game/` | FEX does not support 16K pages, so x86/x86_64 apps and games on shoukei need this pinned flake's 4K-page microVM runtime; our fork lets upstream changes be reviewed before use | Drop once FEX supports 16K pages directly, or nixpkgs/nixos-apple-silicon ships an equivalent runtime | 2026-10-07 | on FEX/nixpkgs/muvm update | active | -| WA-023 | `nix.package = pkgs.nixVersions.latest` — `modules/nixos/base/nix.nix` | NixOS is opted into Nix 2.35 (2.35.3), which nixpkgs ships as `nixVersions.latest`, while `nixVersions.stable` is still 2.34 (2.34.9) | Drop the override and fall back to the default `pkgs.nix` once `nixVersions.stable` is 2.35 or newer | 2026-10-07 | eval warning | active | -| WA-037 | `nixpkgs-small` input on `nixos-unstable-small`, which carries [NixOS/nixpkgs#570230](https://github.com/NixOS/nixpkgs/pull/570230) — `flake.nix`; consumer `pkgs-small` in `outputs/default.nix`, the `intel-npu-driver` overlay in `hosts/idols-aquamarine/hardware-intel-cpu.nix`, and the Python env in `hosts/idols-aquamarine/asr.nix` | The Intel NPU compiler, and the driver change that loads it, are not in `nixos-unstable` yet; `openvino-genai` 2026.4.0.0 failed to build there | Drop the overlay once #570230 reaches `nixos-unstable`; drop the input once `openvino-genai` also builds there | 2026-10-17 | when #570230 reaches `nixos-unstable` | active | +| ID | What & where | Why | Removal condition | Added | Revisit | Status | +| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------- | ------ | +| WA-004 | `catppuccin` on `main` — `flake.nix` | `main` carries the nodejs→nodejs-slim deprecation fix, which is not in a release | Switch to a release tag once it includes the fix | 2026-09-25 | on catppuccin release | active | +| WA-006 | `nixpkgs-blender` — `flake.nix` | Blender 5.2 LTS + CUDA/OptiX pin; keeps `just up` from triggering a full source rebuild | Bump deliberately when needed; drop the pin if the current nixpkgs build is acceptable | 2026-07-24 | deliberate | active | +| WA-020 | `fcitx5-vinput` pinned to release tag `v2.4.2` — `flake.nix`; consumer `home/linux/gui/base/vinput/default.nix` | Tracks a release tag instead of a branch, so `just up` stays on that release | Bump to a newer release tag when its changes are wanted | 2026-10-04 | on vinput release | active | +| WA-021 | `nix-x86-on-aarch64` input — our fork of rowanG077's patched FEX + muvm runtime — `flake.nix`; `hosts/12kingdoms-shoukei/game/` | FEX does not support 16K pages, so x86/x86_64 apps and games on shoukei need this pinned flake's 4K-page microVM runtime; our fork lets upstream changes be reviewed before use | Drop once FEX supports 16K pages directly, or nixpkgs/nixos-apple-silicon ships an equivalent runtime | 2026-10-07 | on FEX/nixpkgs/muvm update | active | +| WA-023 | `nix.package = pkgs.nixVersions.latest` — `modules/nixos/base/nix.nix` | NixOS is opted into Nix 2.35 (2.35.3), which nixpkgs ships as `nixVersions.latest`, while `nixVersions.stable` is still 2.34 (2.34.9) | Drop the override and fall back to the default `pkgs.nix` once `nixVersions.stable` is 2.35 or newer | 2026-10-07 | eval warning | active | +| WA-037 | `nixpkgs-small` input on `nixos-unstable-small`, which carries [NixOS/nixpkgs#570230](https://github.com/NixOS/nixpkgs/pull/570230) — `flake.nix`; consumer `pkgs-small` in `outputs/default.nix`, the `intel-npu-driver` overlay in `hosts/idols-aquamarine/hardware-intel-cpu.nix`, and the Python env in `hosts/idols-aquamarine/asr/default.nix` | The Intel NPU compiler, and the driver change that loads it, are not in `nixos-unstable` yet; `openvino-genai` 2026.4.0.0 failed to build there | Drop the overlay once #570230 reaches `nixos-unstable`; drop the input once `openvino-genai` also builds there | 2026-10-17 | when #570230 reaches `nixos-unstable` | active | ## Workarounds diff --git a/hosts/idols-aquamarine/README.md b/hosts/idols-aquamarine/README.md index de6cd0b4..8b8ef49b 100644 --- a/hosts/idols-aquamarine/README.md +++ b/hosts/idols-aquamarine/README.md @@ -12,7 +12,7 @@ Manual BIOS and power-saving settings are recorded in | Part | Model | Notes | | ------ | ----------------------------------------------------- | ------------------------------------------------------- | | Board | Colorful CVN Z890 ARK FROZEN V20 (BIOS 1013) | moved from `ai` on 2026-10-13, so its EFI vars come too | -| CPU | Intel Core Ultra 7 270K Plus | Arrow Lake; the NPU serves `whisper-asr` (./asr.nix) | +| CPU | Intel Core Ultra 7 270K Plus | Arrow Lake; the NPU serves `whisper-asr` (./asr/) | | Memory | 2x48G JUHOR (96G), 4800 MT/s | the 2x16G kit stayed with `ai` | | GPU | 2x AMD Radeon AI PRO R9700, 32G each (RDNA4, gfx1201) | 64G of VRAM total | | Root | Fanxiang S790 2TB | was `ai`'s `/data` disk until 2026-10-13 | diff --git a/hosts/idols-aquamarine/asr.nix b/hosts/idols-aquamarine/asr/default.nix similarity index 98% rename from hosts/idols-aquamarine/asr.nix rename to hosts/idols-aquamarine/asr/default.nix index a1e9e891..00aa9454 100644 --- a/hosts/idols-aquamarine/asr.nix +++ b/hosts/idols-aquamarine/asr/default.nix @@ -94,7 +94,7 @@ in # Reads its model, writes its cache, uses the NPU and listens on the LAN. serviceConfig = mylib.systemdHardening.service // { - ExecStart = "${pythonEnv}/bin/python ${./asr/server.py}"; + ExecStart = "${pythonEnv}/bin/python ${./server.py}"; CacheDirectory = "whisper-asr"; DynamicUser = true; Restart = "on-failure"; diff --git a/hosts/idols-aquamarine/default.nix b/hosts/idols-aquamarine/default.nix index f9612222..40a324f2 100644 --- a/hosts/idols-aquamarine/default.nix +++ b/hosts/idols-aquamarine/default.nix @@ -33,7 +33,7 @@ in ./secureboot.nix # services - ./asr.nix + ./asr ./idle-suspend.nix ]; diff --git a/hosts/idols-aquamarine/hardware-intel-cpu.nix b/hosts/idols-aquamarine/hardware-intel-cpu.nix index ffb7d8e1..d1545a62 100644 --- a/hosts/idols-aquamarine/hardware-intel-cpu.nix +++ b/hosts/idols-aquamarine/hardware-intel-cpu.nix @@ -4,7 +4,7 @@ ... }: { - # The NPU serves ./asr.nix; the driver's compiler lookup is fixed by + # The NPU serves ./asr; the driver's compiler lookup is fixed by # NixOS/nixpkgs#570230, which reached nixos-unstable-small first (WA-037). hardware.cpu.intel.npu.enable = true; nixpkgs.overlays = [ (_: _: { inherit (pkgs-small) intel-npu-driver; }) ];