1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 17:31:47 +02:00

use separate paragraphs inside list items

This commit is contained in:
Valentin Gagarin 2024-06-17 17:49:09 +02:00
parent e48abec567
commit 4f340213bb
17 changed files with 198 additions and 99 deletions

View file

@ -12,7 +12,8 @@ This operation deletes the specified generations of the current profile.
*generations* can be a one of the following:
- <span id="generations-list">[`<number>...`](#generations-list)</span>:\
- <span id="generations-list">[`<number>...`](#generations-list)</span>
A list of generation numbers, each one a separate command-line argument.
Delete exactly the profile generations given by their generation number.
@ -30,7 +31,8 @@ This operation deletes the specified generations of the current profile.
> Because one can roll back to a previous generation, it is possible to have generations newer than the current one.
> They will also be deleted.
- <span id="generations-time">[`<number>d`](#generations-time)</span>:\
- <span id="generations-time">[`<number>d`](#generations-time)</span>
The last *number* days
*Example*: `30d`
@ -38,7 +40,8 @@ This operation deletes the specified generations of the current profile.
Delete all generations created more than *number* days ago, except the most recent one of them.
This allows rolling back to generations that were available within the specified period.
- <span id="generations-count">[`+<number>`](#generations-count)</span>:\
- <span id="generations-count">[`+<number>`](#generations-count)</span>
The last *number* generations up to the present
*Example*: `+5`

View file

@ -1,6 +1,7 @@
# Environment variables
- `NIX_PROFILE`\
- `NIX_PROFILE`
Location of the Nix profile. Defaults to the target of the symlink
`~/.nix-profile`, if it exists, or `/nix/var/nix/profiles/default`
otherwise.

View file

@ -2,7 +2,8 @@
The following options are allowed for all `nix-env` operations, but may not always have an effect.
- `--file` / `-f` *path*\
- `--file` / `-f` *path*
Specifies the Nix expression (designated below as the *active Nix
expression*) used by the `--install`, `--upgrade`, and `--query
--available` operations to obtain derivations. The default is
@ -13,13 +14,15 @@ The following options are allowed for all `nix-env` operations, but may not alwa
unpacked to a temporary location. The tarball must include a single
top-level directory containing at least a file named `default.nix`.
- `--profile` / `-p` *path*\
- `--profile` / `-p` *path*
Specifies the profile to be used by those operations that operate on
a profile (designated below as the *active profile*). A profile is a
sequence of user environments called *generations*, one of which is
the *current generation*.
- `--dry-run`\
- `--dry-run`
For the `--install`, `--upgrade`, `--uninstall`,
`--switch-generation`, `--delete-generations` and `--rollback`
operations, this flag will cause `nix-env` to print what *would* be
@ -29,7 +32,8 @@ The following options are allowed for all `nix-env` operations, but may not alwa
[substituted](@docroot@/glossary.md) (i.e., downloaded) and which paths
will be built from source (because no substitute is available).
- `--system-filter` *system*\
- `--system-filter` *system*
By default, operations such as `--query
--available` show derivations matching any platform. This option
allows you to use derivations for the specified platform *system*.

View file

@ -35,11 +35,13 @@ The derivations are sorted by their `name` attributes.
The following flags specify the set of things on which the query
operates.
- `--installed`\
- `--installed`
The query operates on the store paths that are installed in the
current generation of the active profile. This is the default.
- `--available`; `-a`\
- `--available` / `-a`
The query operates on the derivations that are available in the
active Nix expression.
@ -50,24 +52,28 @@ selected derivations. Multiple flags may be specified, in which case the
information is shown in the order given here. Note that the name of the
derivation is shown unless `--no-name` is specified.
- `--xml`\
- `--xml`
Print the result in an XML representation suitable for automatic
processing by other tools. The root element is called `items`, which
contains a `item` element for each available or installed
derivation. The fields discussed below are all stored in attributes
of the `item` elements.
- `--json`\
- `--json`
Print the result in a JSON representation suitable for automatic
processing by other tools.
- `--prebuilt-only` / `-b`\
- `--prebuilt-only` / `-b`
Show only derivations for which a substitute is registered, i.e.,
there is a pre-built binary available that can be downloaded in lieu
of building the derivation. Thus, this shows all packages that
probably can be installed quickly.
- `--status`; `-s`\
- `--status` / `-s`
Print the *status* of the derivation. The status consists of three
characters. The first is `I` or `-`, indicating whether the
derivation is currently installed in the current generation of the
@ -78,49 +84,61 @@ derivation is shown unless `--no-name` is specified.
derivation to be built. The third is `S` or `-`, indicating whether
a substitute is available for the derivation.
- `--attr-path`; `-P`\
- `--attr-path` / `-P`
Print the *attribute path* of the derivation, which can be used to
unambiguously select it using the `--attr` option available in
commands that install derivations like `nix-env --install`. This
option only works together with `--available`
- `--no-name`\
- `--no-name`
Suppress printing of the `name` attribute of each derivation.
- `--compare-versions` / `-c`\
- `--compare-versions` / `-c`
Compare installed versions to available versions, or vice versa (if
`--available` is given). This is useful for quickly seeing whether
upgrades for installed packages are available in a Nix expression. A
column is added with the following meaning:
- `<` *version*\
- `<` *version*
A newer version of the package is available or installed.
- `=` *version*\
- `=` *version*
At most the same version of the package is available or
installed.
- `>` *version*\
- `>` *version*
Only older versions of the package are available or installed.
- `- ?`\
- `- ?`
No version of the package is available or installed.
- `--system`\
- `--system`
Print the `system` attribute of the derivation.
- `--drv-path`\
- `--drv-path`
Print the path of the [store derivation](@docroot@/glossary.md#gloss-store-derivation).
- `--out-path`\
- `--out-path`
Print the output path of the derivation.
- `--description`\
- `--description`
Print a short (one-line) description of the derivation, if
available. The description is taken from the `meta.description`
attribute of the derivation.
- `--meta`\
- `--meta`
Print all of the meta-attributes of the derivation. This option is
only available with `--xml` or `--json`.

View file

@ -28,36 +28,42 @@ version is installed.
# Flags
- `--lt`\
- `--lt`
Only upgrade a derivation to newer versions. This is the default.
- `--leq`\
- `--leq`
In addition to upgrading to newer versions, also “upgrade” to
derivations that have the same version. Version are not a unique
identification of a derivation, so there may be many derivations
that have the same version. This flag may be useful to force
“synchronisation” between the installed and available derivations.
- `--eq`\
- `--eq`
*Only* “upgrade” to derivations that have the same version. This may
not seem very useful, but it actually is, e.g., when there is a new
release of Nixpkgs and you want to replace installed applications
with the same versions built against newer dependencies (to reduce
the number of dependencies floating around on your system).
- `--always`\
- `--always`
In addition to upgrading to newer versions, also “upgrade” to
derivations that have the same or a lower version. I.e., derivations
may actually be downgraded depending on what is available in the
active Nix expression.
- `--prebuilt-only` / `-b`\
- `--prebuilt-only` / `-b`
Use only derivations for which a substitute is registered, i.e.,
there is a pre-built binary available that can be downloaded in lieu
of building the derivation. Thus, no packages will be built from
source.
- `--preserve-installed` / `-P`\
- `--preserve-installed` / `-P`
Do not remove derivations with a name matching one of the
derivations being installed. Usually, trying to have two versions of
the same package installed in the same generation of a profile will