Files
nixos-config/home/common/programs/claude/default.nix
T
Miguel Palhas a3f06bcd24
CI / lint (push) Successful in 27s
CI / eval (push) Successful in 1m50s
feat(openwhispr): wire real CUDA support for local transcription
The onnxruntime CUDA execution provider it bundles was hard-failing back
to CPU: konishi has the driver but no CUDA toolkit runtime libs. Adds an
opt-in cudaSupport toggle (cudaPackages_13, pinned to match the provider's
build) and enables it on konishi, the only host with an NVIDIA GPU.
2026-09-07 16:28:00 +01:00

63 lines
1.6 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). Pulls in cudaPackages_13 (multi-GB) when enabled, so opt-in per host.
options.custom.aiApps.cudaAcceleration = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Wire OpenWhispr's onnxruntime CUDA execution provider against cudaPackages_13.";
};
# ~/.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;
};
};
};
}