-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into angerman/mac-fix-recursive-nix
- Loading branch information
Showing
229 changed files
with
4,165 additions
and
1,908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.16.0 | ||
2.17.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Channels | ||
|
||
A directory containing symlinks to Nix channels, managed by [`nix-channel`]: | ||
|
||
- `$XDG_STATE_HOME/nix/profiles/channels` for regular users | ||
- `$NIX_STATE_DIR/profiles/per-user/root/channels` for `root` | ||
|
||
[`nix-channel`] uses a [profile](@docroot@/command-ref/files/profiles.md) to store channels. | ||
This profile contains symlinks to the contents of those channels. | ||
|
||
## Subscribed channels | ||
|
||
The list of subscribed channels is stored in | ||
|
||
- `~/.nix-channels` | ||
- `$XDG_STATE_HOME/nix/channels` if [`use-xdg-base-directories`] is set to `true` | ||
|
||
in the following format: | ||
|
||
``` | ||
<url> <name> | ||
... | ||
``` | ||
|
||
[`nix-channel`]: @docroot@/command-ref/nix-channel.md | ||
[`use-xdg-base-directories`]: @docroot@/command-ref/conf-file.md#conf-use-xdg-base-directories |
52 changes: 52 additions & 0 deletions
52
doc/manual/src/command-ref/files/default-nix-expression.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
## Default Nix expression | ||
|
||
The source for the default [Nix expressions](@docroot@/language/index.md) used by [`nix-env`]: | ||
|
||
- `~/.nix-defexpr` | ||
- `$XDG_STATE_HOME/nix/defexpr` if [`use-xdg-base-directories`] is set to `true`. | ||
|
||
It is loaded as follows: | ||
|
||
- If the default expression is a file, it is loaded as a Nix expression. | ||
- If the default expression is a directory containing a `default.nix` file, that `default.nix` file is loaded as a Nix expression. | ||
- If the default expression is a directory without a `default.nix` file, then its contents (both files and subdirectories) are loaded as Nix expressions. | ||
The expressions are combined into a single attribute set, each expression under an attribute with the same name as the original file or subdirectory. | ||
Subdirectories without a `default.nix` file are traversed recursively in search of more Nix expressions, but the names of these intermediate directories are not added to the attribute paths of the default Nix expression. | ||
|
||
Then, the resulting expression is interpreted like this: | ||
|
||
- If the expression is an attribute set, it is used as the default Nix expression. | ||
- If the expression is a function, an empty set is passed as argument and the return value is used as the default Nix expression. | ||
|
||
|
||
For example, if the default expression contains two files, `foo.nix` and `bar.nix`, then the default Nix expression will be equivalent to | ||
|
||
```nix | ||
{ | ||
foo = import ~/.nix-defexpr/foo.nix; | ||
bar = import ~/.nix-defexpr/bar.nix; | ||
} | ||
``` | ||
|
||
The file [`manifest.nix`](@docroot@/command-ref/files/manifest.nix.md) 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. | ||
|
||
## User channel link | ||
|
||
A symlink that ensures that [`nix-env`] can find your channels: | ||
|
||
- `~/.nix-defexpr/channels` | ||
- `$XDG_STATE_HOME/defexpr/channels` if [`use-xdg-base-directories`] is set to `true`. | ||
|
||
This symlink points to: | ||
|
||
- `$XDG_STATE_HOME/profiles/channels` for regular users | ||
- `$NIX_STATE_DIR/profiles/per-user/root/channels` for `root` | ||
|
||
In a multi-user installation, you may also have `~/.nix-defexpr/channels_root`, which links to the channels of the root user.[`nix-env`]: ../nix-env.md | ||
|
||
[`nix-env`]: @docroot@/command-ref/nix-env.md | ||
[`nix-channel`]: @docroot@/command-ref/nix-channel.md | ||
[`use-xdg-base-directories`]: @docroot@/command-ref/conf-file.md#conf-use-xdg-base-directories |
Oops, something went wrong.