No description
  • Emacs Lisp 44.6%
  • Nix 38.1%
  • Shell 14.8%
  • TypeScript 2.5%
Find a file
2026-06-26 12:40:14 -07:00
features Update pi settings.json 2026-06-26 12:40:14 -07:00
programs chore: remove zshrc-private-sync feature (secrets now managed via sops-nix) 2026-05-21 22:11:31 -07:00
.gitignore feat(agents): implement shared directory and add skills 2026-04-13 17:14:33 -07:00
AGENTS.md docs: add guidance on lib.mkIf vs lib.optionals/lib.optionalAttrs to AGENTS.md files 2026-05-10 10:32:29 -07:00
flake.lock fix: seed settings.json with user's existing config 2026-06-26 10:47:15 -07:00
flake.nix fix: pass llmAgentsPkgs via extraSpecialArgs instead of overlay 2026-06-26 10:43:46 -07:00
home.nix chore: remove zshrc-private-sync feature (secrets now managed via sops-nix) 2026-05-21 22:11:31 -07:00
README.md Update README 2026-01-09 17:20:56 -08:00

nix-conf

My personal nix configuration.

Installing nix

Darwin

Install Deterministic Nix curl -fsSL https://install.determinate.systems/nix | sh -s -- install

Linux

Use the multiuser installer

sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon

Setup this home-manager config

nix run home-manager/master -- --init switch

rm -rf ~/.config/home-manager

git clone git@github.com:davebenvenuti/home-manager.git ~/.config/home-manager

Apply

Assuming the hostnames are set properly (air or shithouse),

home-manager switch

If they're not set, you can switch to individual configurations by doing

home-manager switch --flake .#dave@air

If you get an error about clobber files, run

home-manager switch -b hmbackup

Uninstalling Nix

Darwin

/nix/nix-installer uninstall

Linux

See Nix Reference Manual | Uninstalling Nix

Notes

home-manager was initialized with nix run home-manager/master -- init --switch. This created ~/.config/home-manager.

For more information see the home-manager flakes standalone docs

man home-configuration.nix explains Home Manager configuration specification

https://github.com/sadjow/home-manager/ was helpful

Zshrc.private Sync System

This configuration includes a system to securely sync your ~/.zshrc.private file to Bitwarden. This file is meant for sensitive environment variables, API keys, and other secrets that shouldn't be committed to version control.

How it works:

  1. Prompt Indicator: A yellow asterisk (*) appears in your zsh prompt when ~/.zshrc.private has been modified but not yet synced to Bitwarden.

  2. Sync Command: Run sync-zshrc-private to upload the current version to Bitwarden as a secure note. The note is named .zshrc.private (HOSTNAME).

  3. Status Check: Use zshrc-private-status to check if your file is synced without syncing.

  4. Manual Refresh: If needed, run refresh-zsh-prompt to immediately update the prompt indicator.

Setup:

  1. Ensure Bitwarden CLI is installed and configured (bw command available)
  2. Run bw login to log into your Bitwarden account
  3. Run bw unlock to unlock your vault and get a session key
  4. Set the session key as an environment variable:
    export BW_SESSION="$(bw unlock --raw)"
    
    (Consider adding this to your shell configuration)

Files:

  • ~/.zshrc.private: Your private shell configuration (not tracked in git)
  • ~/.zshrc.private.lastsync: Stores the hash of the last synced version
  • ~/.local/bin/sync-zshrc-private.sh: Sync script
  • ~/.local/share/zsh/zshrc-private-sync.zsh: Zsh plugin for prompt integration

How the prompt indicator updates:

The indicator is part of the PROMPT string itself ($(_zshrc_private_prompt_indicator)), so it's evaluated each time the prompt is displayed. This means it updates automatically without needing to reload your shell or run special commands.