NIX: flake.nix for development environment

This commit is contained in:
Andrew Haynes
2026-03-26 00:57:00 -04:00
parent bf591f0c1b
commit 65241c1d06
7 changed files with 92 additions and 8 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e
if [[ ! -d "/Users/andrew/personal/Projects/C/image_processor" ]]; then
echo "Cannot find source directory; Did you move it?"
echo "(Looking for "/Users/andrew/personal/Projects/C/image_processor")"
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
exit 1
fi
# rebuild the cache forcefully
_nix_direnv_force_reload=1 direnv exec "/Users/andrew/personal/Projects/C/image_processor" true
# Update the mtime for .envrc.
# This will cause direnv to reload again - but without re-building.
touch "/Users/andrew/personal/Projects/C/image_processor/.envrc"
# Also update the timestamp of whatever profile_rc we have.
# This makes sure that we know we are up to date.
touch -r "/Users/andrew/personal/Projects/C/image_processor/.envrc" "/Users/andrew/personal/Projects/C/image_processor/.direnv"/*.rc
+1
View File
@@ -0,0 +1 @@
/nix/store/yy3zc65ij95wfnap3zqcr44kc4wzwlbq-nix-shell-env