Update nix-develop and nix-direnv
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -49,8 +49,21 @@
|
||||
done
|
||||
|
||||
if [[ -z "$devshell" ]]; then
|
||||
echo "use flake" > .envrc
|
||||
if [ ! -f flake.nix ]; then cp "${../nix-develop/template.nix}" flake.nix; fi
|
||||
if "$hide"; then
|
||||
echo "use flake path:." > .envrc;
|
||||
else
|
||||
echo "use flake" > .envrc;
|
||||
fi
|
||||
|
||||
if [ ! -f flake.nix ]; then
|
||||
cp "${../nix-develop/template.nix}" flake.nix
|
||||
chmod 755 flake.nix
|
||||
fi
|
||||
|
||||
if [ ! -f treefmt.nix ]; then
|
||||
cp "${../nix-develop/treefmt.nix}" treefmt.nix
|
||||
chmod 755 treefmt.nix
|
||||
fi
|
||||
else
|
||||
echo "use flake self#$devshell" > .envrc
|
||||
fi
|
||||
@@ -62,6 +75,7 @@
|
||||
if [ -z "$devshell" ]; then
|
||||
if ! grep -q "^flake.nix$" "$top/.gitignore" "$top/.git/info/exclude"; then echo "flake.nix" >> "$top/.git/info/exclude"; fi
|
||||
if ! grep -q "^flake.lock$" "$top/.gitignore" "$top/.git/info/exclude"; then echo "flake.lock" >> "$top/.git/info/exclude"; fi
|
||||
if ! grep -q "^treefmt.nix$" "$top/.gitignore" "$top/.git/info/exclude"; then echo "treefmt.nix" >> "$top/.git/info/exclude"; fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user