mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Add "Nix" tags to 3 Nix code blocks to enable syntax highlighting, add "bash" tag to one.
This commit is contained in:
parent
912b847b4d
commit
46374a40b4
1 changed files with 4 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ There are different ways to install nix-direnv, pick your favourite:
|
||||||
|
|
||||||
In `$HOME/.config/nixpkgs/home.nix` add
|
In `$HOME/.config/nixpkgs/home.nix` add
|
||||||
|
|
||||||
```
|
```Nix
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -45,7 +45,7 @@ Optional: To protect your nix-shell against garbage collection you also need to
|
||||||
|
|
||||||
If you are on NixOS also add the following lines to your `/etc/nixos/configuration.nix`:
|
If you are on NixOS also add the following lines to your `/etc/nixos/configuration.nix`:
|
||||||
|
|
||||||
```
|
```Nix
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
keep-outputs = true
|
keep-outputs = true
|
||||||
|
|
@ -65,7 +65,7 @@ keep-outputs = true
|
||||||
|
|
||||||
In `/etc/nixos/configuration.nix`:
|
In `/etc/nixos/configuration.nix`:
|
||||||
|
|
||||||
```
|
```Nix
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
environment.systemPackages = with pkgs; [ direnv nix-direnv ];
|
environment.systemPackages = with pkgs; [ direnv nix-direnv ];
|
||||||
# nix options for derivations to persist garbage collection
|
# nix options for derivations to persist garbage collection
|
||||||
|
|
@ -96,7 +96,7 @@ nix-env -f '<nixpkgs>' -iA nix-direnv
|
||||||
|
|
||||||
Then add nix-direnv to `$HOME/.direnvrc`:
|
Then add nix-direnv to `$HOME/.direnvrc`:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
source $HOME/.nix-profile/share/nix-direnv/direnvrc
|
source $HOME/.nix-profile/share/nix-direnv/direnvrc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue