# if the nix version from the environment does not support flakes, this adds # nix unstable to the environment if ! nix flake metadata >/dev/null; then use_flake() { watch_file flake.nix watch_file flake.lock [ -d "$(direnv_layout_dir)" ] || mkdir "$(direnv_layout_dir)" eval "$(nix print-dev-env --profile "$(direnv_layout_dir)/flake-profile")" } use nix fi use flake