Files
nixos-config/home/common/programs/claude/default.nix
T
Miguel Palhas a7c74d5a9f
CI / lint (push) Successful in 26s
CI / eval (push) Successful in 1m48s
fix(openwhispr): target CUDA 12 for the GPU whisper sidecar
The previous commit wired CUDA 13 against the bundled onnxruntime provider,
which only accelerates diarization/embeddings — transcription still fell back
to CPU with "GPU could not be activated". The GPU whisper-server is fetched at
runtime and links CUDA 12 SONAMEs, so it needs cudaPackages_12 on
LD_LIBRARY_PATH (plus libstdc++/libgomp, which it also could not resolve).

Verified: whisper-server now reports "found 1 CUDA devices ... RTX 4060" and
loads the model on the CUDA0 backend. Drops the closure 4.6 -> 3.7 GiB.
2026-09-07 16:52:11 +01:00

63 lines
1.5 KiB
Nix

{
pkgs,
inputs,
lib,
...
}:
{
imports = [
inputs.agent-skills.homeModules.default
./synthetic.nix
];
# Shared UI-scale knob for the Electron AI desktop apps (Claude Desktop, T3 Code).
# Set per-host (e.g. konishi's 4K@1x monitors want ~"1.5"); null = native scale.
options.custom.aiApps.deviceScaleFactor = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "1.5";
description = "--force-device-scale-factor value for Claude Desktop and T3 Code.";
};
# OpenWhispr's GPU-accelerated local Whisper transcription (NVIDIA hosts
# only). Adds ~1GiB of CUDA runtime to the closure, so opt-in per host.
options.custom.aiApps.cudaAcceleration = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Make CUDA available to OpenWhispr's GPU whisper-server sidecar.";
};
# ~/.claude/settings.json stays unmanaged: Claude Code rewrites it itself
# (model pins, permission grants, plugin state), so any nix copy drifts within
# a session and every `nh home switch` then aborts on the diff.
config.home = {
packages = with pkgs; [
inputs.claude-code.packages.${pkgs.stdenv.hostPlatform.system}.default
# sandbox
bubblewrap
socat
libseccomp
# voice
sox
# beads
dolt
];
file = {
".default-npm-packages".text = ''
@anthropic-ai/sandbox-runtime
@beads/bd
'';
".claude/statusline.sh" = {
source = ./statusline.sh;
executable = true;
};
};
};
}