CLI reference

Generated from pynix's live command tree — see docs/_generate_pynix_reference.py. Every command also accepts --help for the same information at the terminal.

pynix

pynix — nanopynix CLI

pynix build

Build a Nix derivation value

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--expr

str or None

Build the derivations that the Nix expression EXPR gives, in place of --file. It is pure unless --impure. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

list[str]

Dot-separated attribute path within the evaluation result. Repeatable: each one is a target. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to build with. (default: 'auto')

--eval-store

str or None

Store URI to evaluate with. Defaults to --store. (default: None)

--substituters

str or None

Space-separated substituter URLs. (default: None)

--trusted-public-keys

str or None

Space-separated substituter public keys. (default: None)

--print-build-logs

bool

Print build log lines to stderr. (default: False)

--nom

bool

Show the progress as nix-output-monitor does: the dependency graph of the builds and downloads, and a row of totals, at the bottom of stderr. (default: False)

--keep-going

bool

Keep going in case of failed builds, to the greatest extent possible. (default: False)

--rebuild

bool

Rebuild an already built package and compare the result to the existing store paths. (default: False)

--update-fod

bool

Update plain fixed-output hash literals after a hash mismatch. (default: False)

--dry-run

bool

Build nothing. Report what the build would build and fetch. With --update-fod, show the hash changes without writing them. (default: False)

--namespaced

bool

Build in a private user namespace, against an overlay store whose lower layer is the host store. Nothing is copied in, the host store does not change, and this process owns the sandbox settings that the daemon otherwise controls. Linux only. (default: False)

--overlay-dir

Path or None

Keep the overlay's upper layer here, instead of in a temporary directory that is deleted on exit. Reuse the same directory to keep what earlier --namespaced builds produced. Implies --namespaced. (default: None)

--linux-builder

bool

Build in a Linux VM that this command starts on Apple's Virtualization.framework, and stops when it exits. The VM builds aarch64-linux, and x86_64-linux through Rosetta. Its store overlays the host store, so nothing is copied in. Apple silicon and macOS 26 or later, and the host /nix must be case-sensitive. (default: False)

--linux-builder-guest

str or None

The manifest of the --linux-builder guest: the store path that nix build --file nanopynix internal.linuxBuilder.manifest prints. For debugging: PYNIX_LINUX_BUILDER_DEBUG=1 sends the guest journal to console.log and keeps the VM's directory; PYNIX_LINUX_BUILDER_NESTED=1 or 0 forces nested virtualization on or off. (default: None)

--darwin-builder

bool

Build in a macOS VM that this command starts from a snapshot on QEMU and Hypervisor.framework, and stops when it exits. The snapshot loads in a fraction of a second, and every build starts from the same guest. The VM substitutes or receives every input. Apple silicon only. (default: False)

--darwin-builder-snapshot

str or None

The directory of the --darwin-builder snapshot: a booted macOS guest that darwin_builder.py save wrote, with snapshot.json naming QEMU and its arguments. (default: None)

--copy-back

bool

Copy the outputs of a --namespaced, --linux-builder or --darwin-builder build into the host store when the build succeeds. Without it the outputs are gone when the worker or the VM exits. (default: True)

--out-link

Path or None

Use PATH as prefix for the symlinks to the results. Each one is a garbage collector root. By default, no out links are created. (default: None)

--print-out-paths

bool

Print the resulting output paths on stdout, one on each line, in place of the JSON result. (default: False)

--copy

str or None

Store URI to copy the closure of the outputs into when the build succeeds. --store and the configured builders decide where the build runs, and this option decides where the result ends up. (default: None)

--sandbox-path

list[str]

Extra path to mount into the build sandbox, as /inside=/outside or /path. Repeatable. Requires --namespaced, because the daemon does not let a client change its sandbox. (default: None)

pynix config

Inspect Nix configuration

pynix config show

Show Nix configuration settings

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--setting

str or None

Show only one setting. (default: None)

pynix config check

Check that Nix configuration can be loaded

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

pynix config current-system

Show the effective system used by builtins.currentSystem

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

pynix copy

Copy the closure of a store path from one store to another

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Store paths to copy. Give none when --file or --flake names the target. (default: [])

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--to

str or None

Store URI to copy into. --store is the other side. (default: None)

--from

str or None

Store URI to copy out of. --store is the other side. (default: None)

--check-sigs

bool

Refuse a path that the destination store cannot verify a signature for. (default: True)

--store

str

Store URI for the side that --to or --from does not name. (default: 'auto')

pynix eval

Evaluate a Nix expression and print the result as JSON

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--expr

str or None

Nix expression to evaluate. Reads from stdin if not provided. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--store

str

Store URI to evaluate with. (default: 'auto')

--apply

str or None

Apply the function EXPR to the result before it is printed. (default: None)

--raw

bool

Print the result as a string, with no quotes and no newline. A value that does not coerce to a string is an error. (default: False)

--json

bool

Print the result as nix eval --json prints it: compact JSON on one line, in place of indented JSON. (default: False)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--read-only

bool

Do not instantiate each evaluated derivation. This improves performance, but can cause errors when accessing store paths of derivations during evaluation. (default: False)

pynix derivation

Inspect and manipulate Nix derivations

pynix derivation show

Show the contents of a Nix derivation

Examples: pynix derivation show --file default.nix --attr hello pynix derivation show --flake .#hello pynix derivation show --flake nixpkgs#python3Packages.requests

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to use. (default: 'auto')

pynix develop

Run a command, or an interactive bash, in a derivation's build environment

Everything after -- is the command. Without a command, this starts an interactive bash.

Examples: pynix develop --file default.nix --attr hello pynix develop --flake .# -- make -j4 pynix develop --flake .# -- bash -c 'make | less'

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to build with. (default: 'auto')

--eval-store

str or None

Store URI to evaluate with. Defaults to --store. (default: None)

--print-build-logs

bool

Print build log lines to stderr. (default: False)

command

list[str]

Command to run in the environment, after --. Omit for an interactive bash. (default: [])

pynix edit

Open the Nix expression of a Nix package in $EDITOR

Opens the file of meta.position at its line, as nix edit does. $EDITOR defaults to cat. emacs, nano, vim and kak get the line as +LINE.

Examples: pynix edit --flake nixpkgs#hello pynix edit --file '' --attr hello

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to use. (default: 'auto')

pynix env

Run programs in an environment of packages

pynix env shell

Run a shell in which the named packages are available

Each package's bin directory goes on PATH, with the packages it propagates. Without --file, each installable is a flake reference; with --file, each is an attribute path in that file.

Examples: pynix env shell nixpkgs#jq nixpkgs#hello pynix env shell nixpkgs#git --command git log -- README.md pynix env shell --file '' jq --command jq --version

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

installables

list[str]

Flake references, or attribute paths of --file. (default: [])

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--store

str

Store URI to build with. (default: 'auto')

--print-build-logs

bool

Print build log lines to stderr. (default: False)

--command

list[str]

Command and arguments to run, instead of $SHELL. Takes every argument after it. (default: None)

pynix flake

Inspect and manage Nix flakes

pynix flake show

Show the outputs provided by a flake

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

flake_ref

str

Flake reference (e.g. '.#' or 'nixpkgs#'). (required)

--attrpath

str or None

Dot-separated attribute path within the flake outputs to start from. (default: None)

--store

str

Store URI to evaluate with. (default: 'auto')

pynix flake metadata

Show locked flake metadata

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

flake_ref

str

Flake reference (e.g. '.' or 'nixpkgs'). (required)

--store

str

Store URI to evaluate with. (default: 'auto')

pynix flake info

Alias for flake metadata

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

flake_ref

str

Flake reference (e.g. '.' or 'nixpkgs'). (required)

--store

str

Store URI to evaluate with. (default: 'auto')

pynix flake lock

Create the missing entries of a flake's lock file

An entry that is in the lock file already stays as it is. Nix reports each entry that it adds on stderr.

Examples: pynix flake lock pynix flake lock ./path/to/flake

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

flake_ref

str

Flake reference (default: '.'). (default: '.')

--store

str

Store URI to fetch the inputs into. (default: 'auto')

pynix flake update

Update the inputs of a flake's lock file to their newest revisions

With no input named, this updates every input. Nix reports each input that moves on stderr, with the old and the new revision.

Examples: pynix flake update pynix flake update nixpkgs pynix flake update mid/leaf --flake ./path/to/flake

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

inputs

list[str]

Inputs to update, such as 'nixpkgs' or 'a/b'. Omit to update every input. (default: [])

--flake

str

Flake reference whose lock file to update (default: '.'). (default: '.')

--store

str

Store URI to fetch the inputs into. (default: 'auto')

pynix flake check

Check that a flake evaluates, and build its checks

Each output is checked by its kind, as nix flake check does. The checks of this system are built. With --keep-going every failure is reported before the command fails; without it the first one ends it.

Examples: pynix flake check pynix flake check --no-build ./path/to/flake

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

flake_ref

str

Flake reference (default: '.'). (default: '.')

--no-build

bool

Do not build the checks; evaluate only, and write nothing to the store. (default: False)

--all-systems

bool

Check the outputs of every system, not only this one. (default: False)

--keep-going

bool

Report every failure, not only the first one. (default: False)

--out-link

Path or None

Use PATH as prefix for the symlinks to the results. Each one is a garbage collector root. By default, no out links are created. (default: None)

--print-out-paths

bool

Print the output paths of the checks on stdout, one on each line. (default: False)

--store

str

Store URI to evaluate and build with. (default: 'auto')

pynix fmt

Reformat your code in the standard style

Runs formatter. of the flake in the current directory, as nix fmt does. The formatter gets the arguments, and PRJ_ROOT names the top of the flake. Its exit status is the exit status of pynix.

Examples: pynix fmt pynix fmt -- --check .

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to build with. (default: 'auto')

--print-build-logs

bool

Print build log lines to stderr. (default: False)

args

list[str]

Arguments for the formatter, after --. (default: [])

pynix hash

Compute and convert cryptographic hashes

pynix hash convert

Convert between hash formats

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

hashes

list[str]

Hashes to convert. (default: [])

--from

Literal[base16, nix32, base32, base64, sri] or None

Hash format (base16, nix32, base64, sri). (default: None)

--to

Literal[base16, nix32, base32, base64, sri]

Hash format (base16, nix32, base64, sri). Default: sri. (default: 'sri')

--algo

Literal[blake3, md5, sha1, sha256, sha512] or None

Hash algorithm (blake3, md5, sha1, sha256, or sha512). Can be omitted for SRI hashes. (default: None)

pynix hash path

Print cryptographic hash of the NAR serialisation of a path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Paths to hash. (default: [])

--type

Literal[blake3, md5, sha1, sha256, sha512]

Hash algorithm (blake3, md5, sha1, sha256, or sha512). (default: 'sha256')

--sri

bool

Print the hash in SRI format. (default: False)

--base64

bool

Print the hash in base-64 format. (default: False)

--base32

bool

Print the hash in base-32 (Nix-specific) format. (default: False)

--base16

bool

Print the hash in base-16 format. (default: False)

--algo

Literal[blake3, md5, sha1, sha256, sha512] or None

Hash algorithm (blake3, md5, sha1, sha256, or sha512). (default: None)

--mode

Literal[flat, nar, git]

How to compute the hash of the input. (default: 'nar')

--format

Literal[base16, nix32, base32, base64, sri] or None

Hash format (base16, nix32, base64, sri). Default: sri. (default: None)

pynix hash file

Print cryptographic hash of a regular file

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Paths to hash. (default: [])

--type

Literal[blake3, md5, sha1, sha256, sha512]

Hash algorithm (blake3, md5, sha1, sha256, or sha512). (default: 'sha256')

--sri

bool

Print the hash in SRI format. (default: False)

--base64

bool

Print the hash in base-64 format. (default: False)

--base32

bool

Print the hash in base-32 (Nix-specific) format. (default: False)

--base16

bool

Print the hash in base-16 format. (default: False)

pynix hash to-base16

Convert a hash to base-16 representation (deprecated, use nix hash convert instead)

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

strings

list[str]

Hashes to convert. (default: [])

--type

Literal[blake3, md5, sha1, sha256, sha512] or None

Hash algorithm (blake3, md5, sha1, sha256, or sha512). (default: None)

pynix hash to-base32

Convert a hash to base-32 representation (deprecated, use nix hash convert instead)

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

strings

list[str]

Hashes to convert. (default: [])

--type

Literal[blake3, md5, sha1, sha256, sha512] or None

Hash algorithm (blake3, md5, sha1, sha256, or sha512). (default: None)

pynix hash to-base64

Convert a hash to base-64 representation (deprecated, use nix hash convert instead)

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

strings

list[str]

Hashes to convert. (default: [])

--type

Literal[blake3, md5, sha1, sha256, sha512] or None

Hash algorithm (blake3, md5, sha1, sha256, or sha512). (default: None)

pynix hash to-sri

Convert a hash to SRI representation (deprecated, use nix hash convert instead)

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

strings

list[str]

Hashes to convert. (default: [])

--type

Literal[blake3, md5, sha1, sha256, sha512] or None

Hash algorithm (blake3, md5, sha1, sha256, or sha512). (default: None)

pynix key

Generate and convert Nix signing keys

pynix key generate-secret

Generate a secret key for signing store paths

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--key-name

str

Identifier of the key (e.g. cache.example.org-1). (default: None)

--key-type

str

Type of key: one of the types this Nix has. NixOS/nix has ed25519 only; Determinate Nix also has ml-dsa-44, ml-dsa-65, ml-dsa-87 and ecdsa-p384, which need the cnsa experimental feature. (default: 'ed25519')

pynix key convert-secret-to-public

Generate a public key for verifying store paths from a secret key read from standard input

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

pynix key convert-secret-to-pem

Convert a secret key read from standard input to PEM PKCS#8 format

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

pynix key convert-public-to-pem

Convert a public key read from standard input to PEM SubjectPublicKeyInfo format

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

pynix log

Show the build log for a store path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path whose build log should be printed. (required)

--store

str

Store URI to query. (default: 'auto')

pynix nar

Create or inspect NAR files

pynix nar cat

Print the contents of a file inside a NAR file on stdout

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

nar

Path

NAR file to read. (required)

path

str

Path of the file inside the NAR. (required)

pynix nar dump-path

Serialise a path to stdout in NAR format (deprecated alias for nar pack)

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

Path

Path to serialise. (required)

pynix nar ls

Show information about a path inside a NAR file

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

nar

Path

NAR file to read. (required)

path

str

Path inside the NAR. (required)

--recursive

bool

List subdirectories recursively. (default: False)

--long

bool

Show detailed file information. (default: False)

--directory

bool

Show directories rather than their contents. (default: False)

--json

bool

Produce output in JSON format. (default: False)

pynix nar pack

Serialise a path to stdout in NAR format

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

Path

Path to serialise. (required)

pynix path-info

Show information about a store path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to query (e.g. '/nix/store/hash-name'). (required)

--store

str

Store URI to query. (default: 'auto')

pynix print-dev-env

Print the build environment of a derivation

Examples: pynix print-dev-env --file default.nix --attr hello pynix print-dev-env --flake .#hello --json

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to build with. (default: 'auto')

--eval-store

str or None

Store URI to evaluate with. Defaults to --store. (default: None)

--print-build-logs

bool

Print build log lines to stderr. (default: False)

--json

bool

Print the environment as JSON, instead of the bash that restores it. (default: False)

pynix registry

Manage the flake registry, which resolves an indirect flake reference

pynix registry list

List every flake registry entry, with the layer that holds it

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to query. (default: 'auto')

pynix registry add

Point one flake reference at another

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

from_ref

str

Flake reference to resolve, for example 'nixpkgs'. (required)

to_ref

str

Flake reference it resolves to, for example 'github:NixOS/nixpkgs'. (required)

--registry

str or None

Registry file to change. Defaults to the registry of the user. (default: None)

--store

str

Store URI to use. (default: 'auto')

pynix registry remove

Drop every entry for one flake reference

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

from_ref

str

Flake reference to drop, for example 'nixpkgs'. (required)

--registry

str or None

Registry file to change. Defaults to the registry of the user. (default: None)

--store

str

Store URI to use. (default: 'auto')

pynix registry pin

Pin a flake reference to the reference it resolves to now

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

from_ref

str

Flake reference to pin, for example 'nixpkgs'. (required)

locked

str or None

Flake reference to pin it to. Defaults to the reference itself. (default: None)

--registry

str or None

Registry file to change. Defaults to the registry of the user. (default: None)

--store

str

Store URI to use. (default: 'auto')

pynix repl

Open an interactive Nix evaluation session.

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to evaluate with. (default: 'auto')

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

pynix run

Build an app or a package, and run it

A flake fragment selects as nix run does: apps. first, then packages. and legacyPackages.. A package runs bin/<meta.mainProgram>, or bin/ when it sets none.

Examples: pynix run --flake nixpkgs#hello pynix run --flake .# -- --version pynix run --file '' --attr coreutils --bin ls -- -l

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to build with. (default: 'auto')

--print-build-logs

bool

Print build log lines to stderr. (default: False)

--bin

str or None

Run this program from the directory of the resolved program, instead of the resolved program. A name that is not there fails with the names that are. (default: None)

--linux-builder

bool

Build the program for Linux and run it in a VM that this command starts on Apple's Virtualization.framework. The VM mounts $HOME at the same path, and the program starts in the current directory. Apple silicon and macOS 26 or later, and the host /nix must be case-sensitive. (default: False)

--linux-builder-guest

str or None

The manifest of the --linux-builder guest: the store path that nix build --file nanopynix internal.linuxBuilder.manifest prints. For debugging: PYNIX_LINUX_BUILDER_DEBUG=1 sends the guest journal to console.log and keeps the VM's directory; PYNIX_LINUX_BUILDER_NESTED=1 or 0 forces nested virtualization on or off. (default: None)

--linux-system

Literal[aarch64-linux, x86_64-linux]

The system that --linux-builder evaluates for. x86_64-linux runs through Rosetta. (default: 'aarch64-linux')

args

list[str]

Arguments for the program, after --. (default: [])

pynix sbom

Build a package, and print a Software Bill of Materials for it

The SBOM lists the runtime closure of the default outputs, with the license, source, hashes and patches of each package. --buildtime adds the build closure. The JSON goes to stdout.

Examples: pynix sbom --flake nixpkgs#hello pynix sbom --file '' --attr hello --format spdx pynix sbom --flake .#default --buildtime pynix sbom --flake nixpkgs#hello --cpe-dictionary cpes.csv

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--store

str

Store URI to build with. (default: 'auto')

--print-build-logs

bool

Print build log lines to stderr. (default: False)

--format

Literal[cyclonedx, spdx]

CycloneDX 1.7 JSON, or SPDX 2.3 JSON. SPDX takes its creation time from SOURCE_DATE_EPOCH when it is set. (default: 'cyclonedx')

--buildtime

bool

Also list the build closure: compilers, build tools and sources. (default: False)

--cpe-dictionary

str or None

A CSV of NVD vendor and product names (github.com/tiiuae/cpedict). A package that states no CPE lists the one its product name suggests, as evidence in CycloneDX. (default: None)

pynix shell

Run a shell in which the named packages are available

Each package's bin directory goes on PATH, with the packages it propagates. Without --file, each installable is a flake reference; with --file, each is an attribute path in that file.

Examples: pynix env shell nixpkgs#jq nixpkgs#hello pynix env shell nixpkgs#git --command git log -- README.md pynix env shell --file '' jq --command jq --version

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

installables

list[str]

Flake references, or attribute paths of --file. (default: [])

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--store

str

Store URI to build with. (default: 'auto')

--print-build-logs

bool

Print build log lines to stderr. (default: False)

--command

list[str]

Command and arguments to run, instead of $SHELL. Takes every argument after it. (default: None)

pynix store

Manage the Nix store

pynix store gc

Manage Nix store garbage collection

pynix store gc print-roots

List the garbage collector roots

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to query. (default: 'auto')

pynix store gc print-dead

List paths that would be removed by a garbage collection. Use --rip to actually delete them.

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--rip

bool

Actually delete the dead store paths instead of just listing them. (default: False)

--store

str

Store URI to query. (default: 'auto')

pynix store gc print-alive

List live paths in the store (reachable from GC roots)

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to query. (default: 'auto')

pynix store info

Show store metadata

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to query. (default: 'auto')

pynix store dirs

Show configured local store directories

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to query. (default: 'auto')

pynix store is-valid-path

Check whether a store path is valid

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to check. (required)

--store

str

Store URI to query. (default: 'auto')

pynix store compute-fs-closure

Compute the filesystem closure of a store path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to query. (required)

--flip-direction

bool

Compute the inverse closure. (default: False)

--include-outputs

bool

Include derivation outputs. (default: False)

--include-derivers

bool

Include derivers. (default: False)

--store

str

Store URI to query. (default: 'auto')

pynix store query-missing

Show which paths would need building, substituting, or are unknown

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Store paths to query. (default: [])

--store

str

Store URI to query. (default: 'auto')

pynix store query-derivation-outputs

Show the outputs of a derivation path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Derivation path to query. (required)

--store

str

Store URI to query. (default: 'auto')

pynix store query-valid-derivers

Show valid derivers for a store path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to query. (required)

--store

str

Store URI to query. (default: 'auto')

pynix store list-valid-paths

List all valid paths in the store

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to query. (default: 'auto')

pynix store query-referrers

Show referrers of a store path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to query. (required)

--store

str

Store URI to query. (default: 'auto')

pynix store query-substitutable-paths

Show which paths are substitutable

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Store paths to query. (default: [])

--store

str

Store URI to query. (default: 'auto')

pynix store add-temp-root

Add a temporary GC root for this command's store session

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to root temporarily. (required)

--store

str

Store URI to use. (default: 'auto')

pynix store add-perm-root

Add a permanent GC root symlink

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to root. (required)

gc_root

str

GC root symlink to create. (required)

--store

str

Store URI to use. (default: 'auto')

pynix store add-indirect-root

Register an indirect GC root

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

GC root path to register. (required)

--store

str

Store URI to use. (default: 'auto')

pynix store path-from-hash-part

Resolve a store path from its hash prefix

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

hash_part

str

Store path hash prefix to resolve. (required)

--store

str

Store URI to query. (default: 'auto')

pynix store ensure-path

Ensure a store path is valid, substituting it if available

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Store path to ensure. (required)

--store

str

Store URI to use. (default: 'auto')

pynix store cat

Print a file inside a local Nix store path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

File path to print. (required)

--store

str

Store URI to use. (default: 'auto')

pynix store ls

List files inside a local Nix store path

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

File or directory path to list. (required)

--json

bool

Print machine-readable JSON. (default: False)

--store

str

Store URI to use. (default: 'auto')

pynix store add

Add a file or directory to a Nix store

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Filesystem path to add. (required)

--name

str or None

Override the store path name component. (default: None)

--mode

Literal[nar, flat, git]

Content-addressing method. (default: 'nar')

--hash-algo

Literal[md5, sha1, sha256, sha512, blake3]

Hash algorithm to use. (default: 'sha256')

--dry-run

bool

Compute the store path without adding the content. (default: False)

--store

str

Store URI to use. (default: 'auto')

pynix store add-file

Add a single file to a Nix store

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Filesystem path to add. (required)

--name

str or None

Override the store path name component. (default: None)

--hash-algo

Literal[md5, sha1, sha256, sha512, blake3]

Hash algorithm to use. (default: 'sha256')

--dry-run

bool

Compute the store path without adding the content. (default: False)

--store

str

Store URI to use. (default: 'auto')

pynix store add-path

Add a path to a Nix store using NAR ingestion

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

path

str

Filesystem path to add. (required)

--name

str or None

Override the store path name component. (default: None)

--hash-algo

Literal[md5, sha1, sha256, sha512, blake3]

Hash algorithm to use. (default: 'sha256')

--dry-run

bool

Compute the store path without adding the content. (default: False)

--store

str

Store URI to use. (default: 'auto')

pynix store prefetch-file

Download a file into the Nix store

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

url

str

URL of the file to download. (required)

--name

str or None

Override the name component of the resulting store path. It defaults to the base name of URL. (default: None)

--expected-hash

str or None

The expected hash of the file. When the store already holds a file with this hash, nothing is downloaded. (default: None)

--hash-type

Literal[md5, sha1, sha256, sha512, blake3]

Hash algorithm to use. It also reads a bare --expected-hash. (default: 'sha256')

--executable

bool

Make the resulting file executable. The hash is then a NAR hash, not a flat file hash. (default: False)

--unpack

bool

Unpack the archive (a tarball or a zip file) and add the result to the store. (default: False)

--store

str

Store URI to use. (default: 'auto')

pynix store diff-closures

Compare two filesystem closures

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

before

str

Original store path. (required)

after

str

New store path. (required)

--store

str

Store URI to query. (default: 'auto')

pynix store optimise

Optimise store disk usage by hard-linking duplicate files

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

--store

str

Store URI to optimise. (default: 'auto')

pynix store delete

Delete paths from the Nix store, when no garbage collector root reaches them

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Store paths to operate on. Give none when --file or --flake names the target. (default: [])

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--recursive

bool

Apply operation to closure of the specified paths. (default: False)

--all

bool

Apply the operation to every store path. (default: False)

--store

str

Store URI to operate on. (default: 'auto')

--ignore-liveness

bool

Do not check whether the paths are reachable from a root. (default: False)

--skip-alive

bool

Do not emit errors when attempting to delete something that is still alive, useful with --recursive. (default: False)

--also-referrers

bool

Also allow deletion of any referrers of the specified paths. (default: False)

pynix store verify

Verify the integrity of store paths

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Store paths to operate on. Give none when --file or --flake names the target. (default: [])

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--recursive

bool

Apply operation to closure of the specified paths. (default: False)

--all

bool

Apply the operation to every store path. (default: False)

--store

str

Store URI to operate on. (default: 'auto')

--no-contents

bool

Do not verify the contents of each store path. (default: False)

--no-trust

bool

Do not verify whether each store path is trusted. (default: False)

--substituter

list[str]

Use signatures from the specified store. (default: None)

--sigs-needed

int

Require that each path is signed by at least N different keys. (default: 0)

pynix store sign

Sign store paths with a local key

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Store paths to operate on. Give none when --file or --flake names the target. (default: [])

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--recursive

bool

Apply operation to closure of the specified paths. (default: False)

--all

bool

Apply the operation to every store path. (default: False)

--store

str

Store URI to operate on. (default: 'auto')

--key-file

str

File containing the secret signing key. (default: None)

pynix store copy-sigs

Copy store path signatures from substituters

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

paths

list[str]

Store paths to operate on. Give none when --file or --flake names the target. (default: [])

--file

str or None

Evaluate FILE as a Nix expression. FILE is a path, a lookup path, a URL, or a flake reference, and it may end with '#' and an attribute path. (default: None)

--arg

list[tuple[str, str]]

Pass the value of the Nix expression EXPR as the argument NAME to the function that --file names. Repeatable. (default: None)

--argstr

list[tuple[str, str]]

Pass the string STRING as the argument NAME to the function that --file names. Repeatable. (default: None)

--argjson

list[tuple[str, str]]

Pass the JSON value JSON as the argument NAME to the function that --file names. Repeatable. (default: None)

--args-json

str or None

Pass each key of the JSON object JSON as an argument to the function that --file names. '@FILE' reads the object from FILE. (default: None)

--attr

str or None

Dot-separated attribute path within the evaluation result. (default: None)

--flake

str or None

Evaluate FLAKE, optionally with a '#'-separated attribute path. (default: None)

--impure

bool

Evaluate a flake impurely: allow the environment, mutable paths and builtins.currentSystem. (default: False)

--recursive

bool

Apply operation to closure of the specified paths. (default: False)

--all

bool

Apply the operation to every store path. (default: False)

--store

str

Store URI to operate on. (default: 'auto')

--substituter

list[str]

Copy signatures from the specified store. (default: None)

pynix why-depends

Show the chain of references that puts one store path in the closure of another

Argument

Type

Help

--option

list[tuple[str, str]]

Set the Nix configuration setting NAME to VALUE (overriding nix.conf). Repeatable. (default: None)

--verbosity

str or None

Nix log verbosity: error, warn, notice, info, talkative, chatty, debug, vomit, or 0-7. (default: None)

package

str

Store path whose closure to search (e.g. '/nix/store/hash-name'). (required)

dependency

str

Store path to find in that closure. (required)

--precise

bool

For each link of the chain, name the file that holds the reference. Needs a local store. (default: False)

--store

str

Store URI to query. (default: 'auto')