chore(direnv): update .envrc
- Cleanup direnv-root file - Set filetype for vi-like editors - Format and lint according to shellcheck and shfmt
This commit is contained in:
parent
bc38e568fa
commit
38626ac690
1 changed files with 8 additions and 4 deletions
12
.envrc
12
.envrc
|
|
@ -1,9 +1,13 @@
|
|||
# vi: ft=bash
|
||||
|
||||
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
|
||||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
|
||||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
|
||||
fi
|
||||
|
||||
DEVENV_ROOT_FILE="$(mktemp)"
|
||||
printf %s "${PWD}" > "${DEVENV_ROOT_FILE}"
|
||||
if ! use flake . --override-input devenv-root "file+file://${DEVENV_ROOT_FILE}"; then
|
||||
devenv_root_file="$(mktemp -t devenv-root-XXXXXXXX)"
|
||||
printf %s "${PWD}" >"${devenv_root_file}"
|
||||
if ! use flake . --override-input devenv-root "file+file://${devenv_root_file}"; then
|
||||
printf '%s\n' "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
|
||||
fi
|
||||
rm "${devenv_root_file}"
|
||||
unset devenv_root_file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue