diff --git a/.zshrc b/.zshrc index 31db0e5..68f9bb9 100644 --- a/.zshrc +++ b/.zshrc @@ -137,6 +137,9 @@ man() { # sheldon eval "$(sheldon source)" +# direnv: auto-load per-directory environments (e.g. Nix devShells via .envrc) +eval "$(direnv hook zsh)" + # The next line updates PATH for the Google Cloud SDK. if [ -f '/Users/naoki/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/naoki/google-cloud-sdk/path.zsh.inc'; fi diff --git a/Brewfile b/Brewfile index 464a54a..40543b6 100644 --- a/Brewfile +++ b/Brewfile @@ -2,6 +2,7 @@ tap "aquaproj/aqua" tap "gcenx/wine" tap "playcover/playcover" brew "aqua" +brew "bash" brew "clang-format" brew "cmake" brew "ffmpeg" diff --git a/aqua/aqua-checksums.json b/aqua/aqua-checksums.json index 2aee0ec..3325ab6 100644 --- a/aqua/aqua-checksums.json +++ b/aqua/aqua-checksums.json @@ -30,6 +30,36 @@ "checksum": "A341BF9E1074A1586C2CE3E0E46685C1722B4C99A4699B34A906E3A47E3885E5", "algorithm": "sha256" }, + { + "id": "github_release/github.com/direnv/direnv/v2.37.1/direnv.darwin-amd64", + "checksum": "24FB9CE48B563D7E9FBDD3A4E3E836941654A31CE3E67EBA9EAAFC3DCD8AE73B", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/direnv/direnv/v2.37.1/direnv.darwin-arm64", + "checksum": "4F569F3A36732BFD8B8FEA7BFCC6AD87A59745C109022164D0CA4832451D5369", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/direnv/direnv/v2.37.1/direnv.linux-amd64", + "checksum": "1F1B93DD6F38523FDE26DFAC96151EF9D31A374E3005CD3345FB93555AE0C9B5", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/direnv/direnv/v2.37.1/direnv.linux-arm64", + "checksum": "2A9CEF8D73521D6A3EC3F2871C4B747B8C4CC038628C1B57A7EFA42B393A2D82", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/direnv/direnv/v2.37.1/direnv.windows-amd64", + "checksum": "D96FC8B7CF020C2D4C1DBBC2CCEC5FD1CAB05B51C491F02C8527A7FA6C50A1CD", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/direnv/direnv/v2.37.1/direnv.windows-arm64", + "checksum": "6802F722F5EF12562D6E3E15C26F39E34B337E5BE12EA22F17284552CD782298", + "algorithm": "sha256" + }, { "id": "github_release/github.com/evilmartians/lefthook/v2.1.6/lefthook_2.1.6_Linux_aarch64.gz", "checksum": "F85CC031DA8E3571418170AB53F1E6E184A086B58683E13660BD5248974159A4", diff --git a/aqua/imports/direnv.yaml b/aqua/imports/direnv.yaml new file mode 100644 index 0000000..7afd3f5 --- /dev/null +++ b/aqua/imports/direnv.yaml @@ -0,0 +1,2 @@ +packages: + - name: direnv/direnv@v2.37.1 diff --git a/direnv/direnvrc b/direnv/direnvrc new file mode 100644 index 0000000..4c8388c --- /dev/null +++ b/direnv/direnvrc @@ -0,0 +1,6 @@ +# nix-direnv: caches `use flake` evaluation and pins build deps as gcroots so +# they survive garbage collection. Loaded globally so each project's .envrc +# stays a bare `use flake`. Pinned by version + checksum. +if ! has nix_direnv_version || ! nix_direnv_version 3.1.2; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.1.2/direnvrc" "sha256-Di03ad3a0ueGi6CGrfhrQzyGdQIg9APXIPCAMNQgWYM=" +fi diff --git a/install.sh b/install.sh index cd65ac2..8823eb5 100755 --- a/install.sh +++ b/install.sh @@ -44,6 +44,7 @@ mkdir -p ~/.config/aqua mkdir -p ~/.config/ghostty/themes mkdir -p ~/.config/sheldon mkdir -p ~/.config/nvim +mkdir -p ~/.config/direnv mkdir -p ~/.local/share/sheldon mkdir -p ~/.cursor mkdir -p ~/.claude @@ -80,6 +81,7 @@ ln -sfn "$DOTFILES_DIR/ghostty/themes/kanagawa-wave" ~/.config/ghostty/themes/ka ln -sfn "$DOTFILES_DIR/sheldon/plugins.toml" ~/.config/sheldon/plugins.toml ln -sfn "$DOTFILES_DIR/sheldon/plugins.lock" ~/.local/share/sheldon/plugins.lock ln -sfn "$DOTFILES_DIR/nvim" ~/.config/nvim +ln -sfn "$DOTFILES_DIR/direnv/direnvrc" ~/.config/direnv/direnvrc echo "✓ Symlinks created"