- yt-transcribe: YouTube/X/local-file transcription. Captions first (yt-dlp; X serves auto-captions via its twitter extractor), Whisper fallback (whisper-cli reusing OpenSuperWhisper's ggml model), reclip download reuse, INDEX.md + --list/--index for id->title mapping. - watcher: launchd every 5 min over media/video on the Unraid share, sidecar .txt per download, marker-guarded, stale-marker purge. - Code executes from the nix store via stable ~/.local/bin symlinks: launchd EPERMs on SMB exec; share stays data-only. - brews: declare yt-dlp, whisper.cpp, gallery-dl (cleanup=zap removes undeclared formulas).
99 lines
3.6 KiB
Nix
99 lines
3.6 KiB
Nix
{ ... }:
|
|
|
|
{
|
|
# Determinate already manages the Nix daemon, so nix-darwin shouldn't.
|
|
nix.enable = false;
|
|
programs.zsh.enable = true;
|
|
|
|
# SSH server (macOS 14.4+ gates `systemsetup -setremotelogin` behind Full Disk Access; nix-darwin loads ssh.plist via launchd directly instead).
|
|
services.openssh.enable = true;
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
nixpkgs.hostPlatform = "aarch64-darwin"; # use x86_64-darwin for Intel CPU
|
|
|
|
system.primaryUser = "laptran";
|
|
users.users.laptran = {
|
|
home = "/Users/laptran";
|
|
};
|
|
|
|
system.stateVersion = 6;
|
|
system.defaults = {
|
|
NSGlobalDomain = {
|
|
AppleInterfaceStyle = "Dark";
|
|
KeyRepeat = 2; # fast key repeat
|
|
InitialKeyRepeat = 15; # short delay before repeat
|
|
_HIHideMenuBar = true; # auto-hide the menu bar
|
|
AppleShowAllExtensions = true;
|
|
};
|
|
dock.autohide = true;
|
|
finder.FXPreferredViewStyle = "Nlsv"; # list view by default
|
|
finder.CreateDesktop = false; # clean desktop
|
|
trackpad.Clicking = true; # tap to click
|
|
};
|
|
|
|
nix-homebrew = {
|
|
enable = true;
|
|
user = "laptran";
|
|
autoMigrate = true; # adopt existing homebrew if already installed
|
|
};
|
|
|
|
homebrew = {
|
|
enable = true;
|
|
onActivation.cleanup = "zap"; # remove anything not listed here
|
|
onActivation.autoUpdate = true;
|
|
onActivation.upgrade = true; # upgrade outdated formulae/casks on rebuild
|
|
onActivation.extraFlags = [ "--force" ];
|
|
brews = [
|
|
"ffmpeg"
|
|
"gallery-dl" # X/Twitter media download for yt-transcribe (X video needs auth yt-dlp can't get)
|
|
"gh"
|
|
"herdr"
|
|
# Client-only psql for read-only DB investigation. libpq is the keg-only
|
|
# PostgreSQL client (no postgres server binary, no service); link = true
|
|
# forces `brew link --force` so psql lands on /opt/homebrew/bin and
|
|
# resolves on the normal PATH. No server, service, database, or
|
|
# connection is configured.
|
|
{ name = "libpq"; link = true; }
|
|
"node" # required: opencode2 is an npm global, not a Homebrew formula
|
|
"pi-coding-agent"
|
|
"tea" # Gitea CLI - PRs for firstmate crewmates on unraid.local:3003
|
|
"tmux"
|
|
"treehouse"
|
|
"whisper-cpp" # whisper-cli for yt-transcribe (reuses OpenSuperWhisper's model)
|
|
"yt-dlp" # yt-transcribe engine; same engine reclip runs in its container
|
|
];
|
|
casks = [
|
|
# Codex desktop home: the standalone Codex.app was folded into the ChatGPT
|
|
# app (2026-07); the deprecated `codex-app` cask must not be used.
|
|
"chatgpt"
|
|
"codex" # Codex CLI; shares ~/.codex/config.toml with the desktop app
|
|
"docker-desktop"
|
|
"grok-build"
|
|
"opensuperwhisper" # local Whisper dictation; model seed in home.nix
|
|
"puremac"
|
|
"utm"
|
|
"wezterm"
|
|
];
|
|
};
|
|
|
|
# yt-transcribe-watcher: scans reclip's download dir (media/video on the
|
|
# Unraid share) every 5 min and transcribes new media files (Whisper — a
|
|
# bare download carries no captions). Runs the nix-store copy through a
|
|
# stable ~/.local/bin symlink — launchd can neither exec from the SMB share
|
|
# (EPERM) nor reach into TCC-protected ~/Documents. Silent exit when the
|
|
# share is unmounted.
|
|
launchd.user.agents."yt-transcribe-watcher" = {
|
|
command = "/Users/laptran/.local/bin/yt-transcribe-watcher";
|
|
serviceConfig = {
|
|
StartInterval = 300;
|
|
StandardOutPath = "/tmp/yt-transcribe-watcher.out";
|
|
StandardErrorPath = "/tmp/yt-transcribe-watcher.err";
|
|
EnvironmentVariables = {
|
|
HOME = "/Users/laptran";
|
|
PATH = "/usr/bin:/bin:/usr/sbin:/sbin";
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|