mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-05 17:39:30 +00:00
fix(direnv)!: gitignore .envrc
A common workflow is to have a local .envrc, allow contributors to do so. Still provide the recommended Nix-based setup, for those who wish to use it. That file can then be copied to or symlinked to `.envrc`.
This commit is contained in:
16
.envrc.recommended
Normal file
16
.envrc.recommended
Normal file
@@ -0,0 +1,16 @@
|
||||
# vi: ft=bash
|
||||
#
|
||||
# If you wish to use this file, copy or symlink it to `.envrc` for direnv to read it.
|
||||
# This will use the flake development shell.
|
||||
|
||||
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="
|
||||
fi
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user