mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
README: Remove "Shell Integration" section
This is better encapsulated as a recommendation in, say, `direnv`'s readme. Our repo has arguably too much documentation already and this is only somewhat related to our domain. We may want to re-instantiate this as a "TIPS.md" or something, but I don't feel that this belongs in the top-level rendered README.
This commit is contained in:
parent
b2db5be94c
commit
e1df1d7484
1 changed files with 0 additions and 35 deletions
35
README.md
35
README.md
|
|
@ -258,41 +258,6 @@ nix_direnv_watch_file mod1.nix mod2.nix
|
||||||
use flake
|
use flake
|
||||||
```
|
```
|
||||||
|
|
||||||
## Shell integration
|
|
||||||
|
|
||||||
To quickly add a `default.nix`/`flake.nix` to a project you can put the following snippets in your `.bashrc`/`.zshrc`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nixify() {
|
|
||||||
if [ ! -e ./.envrc ]; then
|
|
||||||
echo "use nix" > .envrc
|
|
||||||
direnv allow
|
|
||||||
fi
|
|
||||||
if [[ ! -e shell.nix ]] && [[ ! -e default.nix ]]; then
|
|
||||||
cat > default.nix <<'EOF'
|
|
||||||
with import <nixpkgs> {};
|
|
||||||
mkShell {
|
|
||||||
nativeBuildInputs = [
|
|
||||||
bashInteractive
|
|
||||||
];
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
${EDITOR:-vim} default.nix
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
flakify() {
|
|
||||||
if [ ! -e flake.nix ]; then
|
|
||||||
nix flake new -t github:nix-community/nix-direnv .
|
|
||||||
elif [ ! -e .envrc ]; then
|
|
||||||
echo "use flake" > .envrc
|
|
||||||
direnv allow
|
|
||||||
fi
|
|
||||||
${EDITOR:-vim} flake.nix
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Known Bugs
|
## Known Bugs
|
||||||
|
|
||||||
At the moment `nix-direnv` depends on GNU Grep and a modern Bash version.
|
At the moment `nix-direnv` depends on GNU Grep and a modern Bash version.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue