Skip to content

Instantly share code, notes, and snippets.

View jwiegley's full-sized avatar

John Wiegley jwiegley

View GitHub Profile
rspamd: Add LiteLLM GPT integration
- **modules/services/rspamd.nix**:
- Define a new SOPS secret `litellm-vulcan-lan` owned by the `rspamd` user,
ensuring the secret is re‑loaded when the service restarts.
- Extend `serviceConfig.LoadCredential` to expose the LiteLLM API key to the
daemon alongside the existing controller password.
- Introduce a temporary “info” logging level for GPT debugging (previously
“warning”).
- Add a new `gpt.conf` override containing full LiteLLM proxy configuration
rspamd.nix: Add LLM-based spam detection via LiteLLM
- Add GPT integration for AI-powered spam classification using local LiteLLM
proxy (hera/gpt-oss-120b model at localhost:4000), with autolearn enabled to
feed GPT results back to Bayes classifier, custom X-GPT-Spam-Reason header
for transparency, 15s timeout, and 500 token completion limit
- Add SOPS secret configuration for litellm-vulcan-lan API key with rspamd
ownership, 0400 permissions, and service restart trigger

Setting up a new Yubikey

Ensure Yubikey works

Run gpg --card-status to make sure the Yubikey is seen.

#!/usr/bin/env bash
# claude-sandbox - Run Claude in a sandboxed firejail environment
# This script runs Claude in firejail with filesystem isolation
# while maintaining access to current directory and Claude configuration
set -euo pipefail
# Capture current environment
CURRENT_DIR="$(pwd)"
~ ❯ sudo /etc/nixos/scripts/email-tester.py
======================================================================
EMAIL PIPELINE TESTER
======================================================================
User: johnw
Started: 2025-11-07 12:50:29
✓ IMAP password loaded
======================================================================
TEST 1: Normal Email Delivery
{
"model": "claude-haiku-4-5-20251001",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "<system-reminder>\nAs you answer the user's questions, you can use the following context:\n# claudeMd\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default behavior and you MUST follow them exactly as written.\n\nContents of /Users/johnw/src/nix/CLAUDE.md (project instructions, checked into the codebase):\n\n# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Overview\n\nThis is a personal Nix configuration repository for managing macOS (Darwin) and NixOS systems using Nix flakes, nix-darwin, and home-manager. The configuration manages three macOS hosts (hera, clio, athena) and one NixOS host (vulcan).\n\n## Working with Nix: Use Specialized Tools\n\n**IMPORTANT**: For any Nix-related tasks in th

pact-atom (public)

  • ggobugi27 (admin)

loans-demo (private)

  • ggobugi27 (write)

KIPs (public)

  • frostweb3 (write)

pact-lang.org-code (public)

=============================================================================================================================
Repository Parent Repository Stars Visibility Last Updated
=============================================================================================================================
alloy-rs-chains alloy-rs/chains 0 public 2025-08-11 16:26:27 UTC
ansi-terminal UnkindPartition/ansi-terminal 0 public 2024-11-13 03:51:37 UTC
argumentcomputer-zk-light-clients argumentcomputer/zk-light-clients 0 public 2025-03-24 17:51:56 UTC
beam haskell-beam/beam 0 public 2020-06-05 05:31:48 UTC
beam-automigrate mightybyte/beam-automigrate 0
0 chainweb-crd
0 chainweb-node-nixos-module
0 chainweb-private-20220121
0 community-issues
0 docs-internal
0 hs-nix-infra
0 kadena-ci
0 kda-components
0 kdatool_multi_accounts
0 vrkl

AI Development Process

Set initial variables