diff options
| author | 2026-06-05 11:05:58 +0100 | |
|---|---|---|
| committer | 2026-06-05 11:05:58 +0100 | |
| commit | 24d832de3ad0bf749fd63fc5239a57371b2fdc3e (patch) | |
| tree | f01913d404aa17aa5443cfe8e48a61e4ae5a753f /dot_local/bin/executable_dictate | |
| parent | 413b81c8b24a47fe9041aae1db5b5bf1a8a5c734 (diff) | |
| download | dotfiles-24d832de3ad0bf749fd63fc5239a57371b2fdc3e.tar.gz dotfiles-24d832de3ad0bf749fd63fc5239a57371b2fdc3e.tar.bz2 dotfiles-24d832de3ad0bf749fd63fc5239a57371b2fdc3e.zip | |
fix(systemd,scripts): unhardcode /usr/bin paths for nix-migrated tools
The chezmoi-owned user units and ~/.local/bin wrapper scripts called
the migrated tools by absolute /usr/bin/ path. After the move to nix,
those binaries live under ~/.nix-profile/bin (no /usr/bin alias).
systemd user units: drop the /usr/bin/ prefix on cliphist-{text,image}
(wl-paste), inhibridge, swayidle, swayrd, waybar, and the inner wob
in wob.service (outer /usr/bin/sh stays, sh is system). systemd
resolves bare names through the unit's inherited PATH, which includes
~/.nix-profile/bin via hm-session-vars.
dictate: default_model now points at
~/.nix-profile/share/whisper-cpp-models/ggml-base.bin (overridable via
$WHISPER_MODEL). Header rewritten to mention nix instead of AUR.
yt-dlp / streamlink wrappers: pass $HOME/.nix-profile/bin/<tool> to
_sandbox-net-parser so the bwrap-sandboxed binary is resolved
explicitly (the wrappers shadow PATH lookup inside their own
~/.local/bin so re-entry would loop).
Diffstat (limited to 'dot_local/bin/executable_dictate')
| -rw-r--r-- | dot_local/bin/executable_dictate | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/dot_local/bin/executable_dictate b/dot_local/bin/executable_dictate index dbf89b6..bf1157c 100644 --- a/dot_local/bin/executable_dictate +++ b/dot_local/bin/executable_dictate @@ -3,8 +3,9 @@ # 2nd stops, transcribes via whisper.cpp, types the result into the focused # window with wtype, and copies it to the clipboard. # -# Pacman: pipewire-pulse (parecord), wtype, wl-clipboard, libnotify -# AUR: whisper.cpp, whisper.cpp-model-large-v3-turbo-q5_0 +# Pacman: pipewire-pulse (parecord), libnotify +# Nix: whisper-cpp (+ vulkan), whisper-cpp-model-base, wtype, wl-clipboard +# (see nix/host.nix) # # Override via env: # WHISPER_MODEL path to a ggml-*.bin model @@ -16,7 +17,7 @@ state_dir="${XDG_RUNTIME_DIR:-/tmp}/dictate" pid_file="$state_dir/pid" wav_file="$state_dir/audio.wav" log_file="$state_dir/whisper.log" -default_model='/usr/share/whisper.cpp-model-base/ggml-base.bin' +default_model="$HOME/.nix-profile/share/whisper-cpp-models/ggml-base.bin" model="${WHISPER_MODEL:-$default_model}" lang="${WHISPER_LANG:-auto}" @@ -29,12 +30,12 @@ is_recording() { start_recording() { if ! command -v whisper-cli >/dev/null; then notify-send -u critical "🎙️ dictate" \ - "whisper-cli not found. Install whisper.cpp (AUR)." + "whisper-cli not found. Run 'just nix-switch' (host profile)." exit 1 fi if [ ! -r "$model" ]; then notify-send -u critical "🎙️ dictate" \ - "Model missing: $model. Install whisper.cpp-model-base (AUR)." + "Model missing: $model. Run 'just nix-switch' (host profile)." exit 1 fi rm -f "$wav_file" |
