First, we try to use the ambient Nix version.
Then, we try to use $NIX_DIRENV_FALLBACK_NIX, which is set by default,
but can also be overridden by the user.
Only then, if neither is available, we fail.
Fixes#451.
The home-manager options have been changed (namely, nix-direnv is an option inside of programs.direnv). Also included the option for enabling Bash integration and left a note for how to enable integration for other shells through HM options... I also removed the section on keep-outputs and keep-derivations since, based on the Nix Manual, outputs/derivations that are registered as GC roots will be kept regardless of these settings (and as I understand it, nix-direnv does indeed register shells as GC roots). So telling users to enable these options would just keep behind extra garbage for them (in my opinion, one of the reasons to use nix-direnv is so that you DON'T have to enable these options and can keep garbage collecting everything else per usual.
- Always create the nix-direnv-reload script
- Use 0/1 for booleans
- Avoid crashing when profile_rc does not exist
- Use better internal variable name for manual mode
- Make use_nix work
- Avoid unneccessary forks
- Fix shellcheck failures
- Update mtime on profile rc files to avoid confusion about if the files
are up to date
- Add instructions to README.md
The version has been updated (from 2.2.0 to 2.2.1) but the hash has not
been updated, resulting in the following error
direnv: error hash mismatch. Expected 'sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=' but got 'sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs='