From 80d465fbfcae648a54e947651f4b3cfcce79abb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Tue, 31 Jan 2023 01:58:41 +0100 Subject: [PATCH] Add `nix profile` installation guide --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5c25c0e..5fdfc7f 100644 --- a/README.md +++ b/README.md @@ -131,9 +131,9 @@ source /run/current-system/sw/share/nix-direnv/direnvrc
- With nix-env + With `nix-env` -### With nix-env +### With `nix-env` As **non-root** user do the following: @@ -150,6 +150,28 @@ source $HOME/.nix-profile/share/nix-direnv/direnvrc You also need to set `keep-outputs` and `keep-derivations` to nix.conf as described in the installation via home-manager section. +
+ +
+ With `nix profile` + +### With `nix profile` + +As **non-root** user do the following: + +```shell +nix profile install nixpkgs#nix-direnv +``` + +Then add nix-direnv to `$HOME/.direnvrc`: + +```bash +source $HOME/.nix-profile/share/nix-direnv/direnvrc +``` + +You also need to set `keep-outputs` and `keep-derivations` to nix.conf +as described in the installation via home-manager section. +