dotfiles: add beets, sync-music script, firstmate, ngrok, openssh, gh/tmux/treehouse/opencode/pi brews
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
directory: /Volumes/data/media/music
|
||||
library: /Volumes/data/media/music/beets/beets_library.db
|
||||
|
||||
import:
|
||||
move: yes
|
||||
copy: no
|
||||
resume: ask
|
||||
timid: no
|
||||
quiet: no
|
||||
|
||||
paths:
|
||||
default: $artist/$album/$track $title
|
||||
singleton: Non-Album/$artist/$title
|
||||
comp: Compilations/$album/$track $title
|
||||
albumtype_soundtrack: Soundtracks/$album/$track $title
|
||||
@@ -1,3 +1,4 @@
|
||||
onboarding = false
|
||||
[keys]
|
||||
prefix = "ctrl+b"
|
||||
focus_pane_left = "prefix+h"
|
||||
|
||||
+27
-10
@@ -1,11 +1,5 @@
|
||||
# Grok Build user config - managed via home-manager (edit here, then rebuild if needed).
|
||||
# Adapted from Claude Code setup in kunchenguid/dotfiles + local preferences.
|
||||
#
|
||||
# Mapping notes:
|
||||
# Claude --dangerously-skip-permissions -> permission_mode = "always-approve" / --yolo
|
||||
# Claude theme dark-ansi + rose-pine stack -> theme = "rosepine"
|
||||
# Claude statusLine (model | ctx %) -> no direct equivalent; TUI shows this natively
|
||||
# Shared AGENTS.md -> ~/.grok/AGENTS.md (via home.nix)
|
||||
# Source of truth: home/.grok/config.toml in dotfiles.
|
||||
|
||||
[marketplace]
|
||||
official_marketplace_auto_installed = true
|
||||
@@ -15,14 +9,37 @@ name = "xAI Official"
|
||||
git = "https://github.com/xai-org/plugin-marketplace.git"
|
||||
|
||||
[models]
|
||||
default = "grok-build"
|
||||
default = "ornith"
|
||||
|
||||
[model.ornith]
|
||||
model = "/models/ornith-1.0-35b-Q6_K.gguf"
|
||||
base_url = "http://10.37.0.165:30081/v1"
|
||||
name = "Ornith 1.0 35B (Talos)"
|
||||
description = "Local Ornith-1.0-35B Q6_K via llama.cpp on Talos worker 1 (RTX 4070 Super)"
|
||||
api_backend = "chat_completions"
|
||||
temperature = 0.7
|
||||
top_p = 0.95
|
||||
context_window = 132768
|
||||
max_completion_tokens = 16384
|
||||
|
||||
[model.genesis]
|
||||
model = "/models/Hermes3.6-35B-A3B-Uncensored-Genesis-V6-APEX.gguf"
|
||||
base_url = "http://10.37.0.219:30082/v1"
|
||||
name = "Genesis Hermes V6 (Talos W2)"
|
||||
description = "Local Qwen3.6-35B-A3B Genesis Hermes V6 APEX + vision via llama.cpp on Talos worker 2 (RTX 3080)"
|
||||
api_backend = "chat_completions"
|
||||
temperature = 0.7
|
||||
top_p = 0.95
|
||||
context_window = 131072
|
||||
max_completion_tokens = 16384
|
||||
|
||||
[ui]
|
||||
theme = "rosepine"
|
||||
max_thoughts_width = 120
|
||||
fork_secondary_model = "grok-build"
|
||||
# High-agency default, same idea as `claude --dangerously-skip-permissions` / `codex --full-auto`.
|
||||
# Toggle per session with Ctrl+O or /always-approve. Shell alias `gb` also launches with --yolo.
|
||||
permission_mode = "always-approve"
|
||||
yolo = false
|
||||
compact_mode = false
|
||||
|
||||
[cli]
|
||||
installer = "internal"
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
#!/bin/bash
|
||||
# sync-music — manually sync ~/Music into the beets library on the Unraid NAS.
|
||||
#
|
||||
# sync-music # shell alias -> ~/.local/bin/sync-music
|
||||
#
|
||||
# How it works:
|
||||
# 1. Ensures the NAS SMB share is mounted at /Volumes/data (uses your keychain
|
||||
# credentials; falls back to a clear error if it can't mount).
|
||||
# 2. Imports every audio file in ~/Music into beets via
|
||||
# `beet import --noautotag --move --quiet`, which moves each file into the
|
||||
# library and removes it from ~/Music. Files already in the library are
|
||||
# skipped by beets (left in place). Safe to re-run any time.
|
||||
#
|
||||
# Why a manual script (not the old daemon)? The daemon kept dying because
|
||||
# launchd/WezTerm spawn a minimal PATH that lacks /opt/homebrew/bin (where
|
||||
# `beet` lives). Running this script yourself in your own shell avoids that.
|
||||
#
|
||||
# Configure your server below.
|
||||
|
||||
NAS_HOST="unraid.local"
|
||||
NAS_SHARE="data"
|
||||
NAS_USER="backup"
|
||||
MOUNT_POINT="/Volumes/data"
|
||||
LIBRARY_DIR="$MOUNT_POINT/media/music"
|
||||
|
||||
WATCH_DIR="$HOME/Music"
|
||||
LOG_FILE="$HOME/Library/Logs/beet-watch.log"
|
||||
|
||||
AUDIO_EXT="flac|mp3|m4a|aac|wav|alac|ogg|wma|opus|aiff|aif"
|
||||
|
||||
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" | tee -a "$LOG_FILE"; }
|
||||
|
||||
# --- locate beet — works whether it comes from nix profile or Homebrew ---
|
||||
BEET="$(command -v beet 2>/dev/null || true)"
|
||||
if [ ! -x "$BEET" ]; then
|
||||
echo "ERROR: beet not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- 1. ensure the NAS is mounted ---
|
||||
if [ ! -d "$MOUNT_POINT" ]; then
|
||||
log "NAS not mounted; mounting smb://$NAS_USER@$NAS_HOST/$NAS_SHARE ..."
|
||||
open "smb://$NAS_USER@$NAS_HOST/$NAS_SHARE" 2>/dev/null || true
|
||||
for _ in $(seq 1 30); do
|
||||
[ -d "$MOUNT_POINT" ] && break
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
if [ ! -d "$MOUNT_POINT" ]; then
|
||||
echo "ERROR: $MOUNT_POINT is not mounted." >&2
|
||||
echo " Mount it, then re-run:" >&2
|
||||
echo " open smb://$NAS_USER@$NAS_HOST/$NAS_SHARE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- 2. import every (finished) audio file in ~/Music ---
|
||||
log "sync-music: scanning $WATCH_DIR -> $LIBRARY_DIR"
|
||||
|
||||
shopt -s nullglob nocaseglob
|
||||
files=()
|
||||
for f in "$WATCH_DIR"/*; do
|
||||
[ -f "$f" ] || continue
|
||||
[[ "${f##*.}" =~ ^($AUDIO_EXT)$ ]] && files+=("$f")
|
||||
done
|
||||
shopt -u nocaseglob nullglob
|
||||
|
||||
total=${#files[@]}
|
||||
log "Found $total audio file(s)."
|
||||
|
||||
ok=0; skipped=0; failed=0
|
||||
for f in "${files[@]}"; do
|
||||
# skip files still being written (size must be stable for 1s)
|
||||
s1=$(stat -f%z "$f" 2>/dev/null || echo 0)
|
||||
sleep 1
|
||||
s2=$(stat -f%z "$f" 2>/dev/null || echo 0)
|
||||
if [ "$s1" != "$s2" ]; then
|
||||
log " still writing, skipping: $(basename "$f")"
|
||||
skipped=$((skipped + 1))
|
||||
continue
|
||||
fi
|
||||
|
||||
bn=$(basename "$f")
|
||||
log " importing: $bn"
|
||||
# stdin from /dev/null so beets never blocks waiting for a prompt
|
||||
out=$("$BEET" import --noautotag --move --quiet "$f" </dev/null 2>&1)
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
if [ -f "$f" ]; then
|
||||
log " already in library (skipped, left in place): $bn"
|
||||
else
|
||||
log " moved into library: $bn"
|
||||
fi
|
||||
ok=$((ok + 1))
|
||||
else
|
||||
log " FAILED (rc=$rc): $bn :: $(printf '%s' "$out" | head -c 200)"
|
||||
failed=$((failed + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
log "sync-music complete: $total considered, ok=$ok, still-writing-skipped=$skipped, failed=$failed"
|
||||
[ "$failed" -gt 0 ] && log " some imports failed; fix and re-run."
|
||||
exit 0
|
||||
Reference in New Issue
Block a user