1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-24 11:19:35 +01:00

doc: De-emphasize nix-env without -A

The manual uses `nix-env -i` without `-A` prominently, teaching a bad practice to newcomers.

(cherry picked from commit ca4d8ce9e2)
This commit is contained in:
Jan Tojnar 2021-11-17 16:30:39 +01:00 committed by github-actions[bot]
parent 8d12084707
commit 49f63b9d60
9 changed files with 80 additions and 61 deletions

View file

@ -162,11 +162,11 @@ Most Nix commands accept the following command-line options:
}: ...
```
So if you call this Nix expression (e.g., when you do `nix-env -i
So if you call this Nix expression (e.g., when you do `nix-env -iA
pkgname`), the function will be called automatically using the
value [`builtins.currentSystem`](../expressions/builtins.md) for
the `system` argument. You can override this using `--arg`, e.g.,
`nix-env -i pkgname --arg system \"i686-freebsd\"`. (Note that
`nix-env -iA pkgname --arg system \"i686-freebsd\"`. (Note that
since the argument is a Nix string literal, you have to escape the
quotes.)