diff --git a/pkgs/crunch/default.nix b/pkgs/crunch/default.nix new file mode 100644 index 0000000..8bdf857 --- /dev/null +++ b/pkgs/crunch/default.nix @@ -0,0 +1,264 @@ +{ + lib, + stdenv, + writeShellScriptBin, + coreutils, + bash, +}: let + script = writeShellScriptBin "crunch" '' + #!/usr/bin/env bash + set -euo pipefail + + # ═══════════════════════════════════════════════════════════════ + # crunch — Voice-notified reminders & AI crunch jobs + # via systemd transient timers. + # + # Requires: talk (ElevenLabs TTS) in PATH, ELEVENLABS_API_KEY env. + # Optional: pi, opencode for AI crunch mode. + # ═══════════════════════════════════════════════════════════════ + + TALK="''${TALK:-talk}" + SELF="$(readlink -f "''${BASH_SOURCE[0]:-$0}")" + + # ── Helpers ─────────────────────────────────────────────────── + + usage() { + cat <<'EOF' + crunch — voice-notified reminders and AI jobs via systemd timers + + Usage: + crunch at