From da0dbf36cbf5aebe559af08d3b9a83b880af1673 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Wed, 26 Apr 2023 15:37:23 +0200 Subject: [PATCH] move manifest information to the bottom of the page --- .../files/default-nix-expression.md | 2 +- .../src/command-ref/files/user-profiles.md | 38 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/manual/src/command-ref/files/default-nix-expression.md b/doc/manual/src/command-ref/files/default-nix-expression.md index 1ce40f019..1c857b0b1 100644 --- a/doc/manual/src/command-ref/files/default-nix-expression.md +++ b/doc/manual/src/command-ref/files/default-nix-expression.md @@ -28,7 +28,7 @@ For example, if the default expression contains two files, `foo.nix` and `bar.ni } ``` -The file `manifest.nix` is always ignored. +The file [`manifest.nix`](@docroot@/command-ref/files/user-profiles.md#manifest.nix) is always ignored. The command [`nix-channel`] places a symlink to the user's current [channels profile](@docroot@/command-ref/files/channels.md) in this directory. This makes all subscribed channels available as attributes in the default expression. diff --git a/doc/manual/src/command-ref/files/user-profiles.md b/doc/manual/src/command-ref/files/user-profiles.md index 1862caff8..be590883e 100644 --- a/doc/manual/src/command-ref/files/user-profiles.md +++ b/doc/manual/src/command-ref/files/user-profiles.md @@ -50,6 +50,25 @@ lrwxrwxrwx 3 root root 107 Jan 1 1970 us.zoom.Zoom.desktop -> /nix/store/wbhg2 … ``` +## User profile link + +A symbolic link to the user's current profile: + +- `~/.nix-profile` +- `$XDG_STATE_HOME/nix/profile` if [`use-xdg-base-directories`] is set to `true`. + +By default, this symlink points to: + +- `$XDG_STATE_HOME/nix/profiles/profile` for regular users +- `$NIX_STATE_DIR/profiles/per-user/root/profile` for `root` + +The `PATH` environment variable should include `/bin` subdirectory of the profile link (e.g. `~/.nix-profile/bin`) for the user environment to be visible to the user. +The [installer](@docroot@/installation/installing-binary.md) sets this up by default, unless you enable [`use-xdg-base-directories`]. + +[`nix-env`]: @docroot@/command-ref/nix-env.md +[`nix profile`]: @docroot@/command-ref/new-cli/nix3-profile.md +[`use-xdg-base-directories`]: @docroot@/command-ref/conf-file.md#conf-use-xdg-base-directories + ## Manifest The manifest file records the provenance of the packages that are installed in this version of the profile. @@ -225,22 +244,3 @@ has the following fields: * `active`: Whether the profile contains symlinks to the files of this package. If set to false, the package is kept in the Nix store, but is not "visible" in the profile's symlink tree. - -## User profile link - -A symbolic link to the user's current profile: - -- `~/.nix-profile` -- `$XDG_STATE_HOME/nix/profile` if [`use-xdg-base-directories`] is set to `true`. - -By default, this symlink points to: - -- `$XDG_STATE_HOME/nix/profiles/profile` for regular users -- `$NIX_STATE_DIR/profiles/per-user/root/profile` for `root` - -The `PATH` environment variable should include `/bin` subdirectory of the profile link (e.g. `~/.nix-profile/bin`) for the user environment to be visible to the user. -The [installer](@docroot@/installation/installing-binary.md) sets this up by default, unless you enable [`use-xdg-base-directories`]. - -[`nix-env`]: @docroot@/command-ref/nix-env.md -[`nix profile`]: @docroot@/command-ref/new-cli/nix3-profile.md -[`use-xdg-base-directories`]: @docroot@/command-ref/conf-file.md#conf-use-xdg-base-directories