nix3-flake-archive(1)
π nix3-flake-archive(1) π
okay so bestie, welcome to the General Commands Manual entry for nix flake archive, and lemme tell you, we're about to copy a whole flake and all its little input babies to a store π
β οΈ Warning β this program is experimental and its interface is subject to change. fr fr, it might glow up and change on you. π
β¨ Name β¨
nix flake archive β copy a flake and all its inputs to a store π«Άπ¦
πΈ Synopsis πΈ
nix flake archive [optionβ¦] flake-url
π Examples π
- Copy the
dwarffsflake and its dependencies to a binary cache:
# nix flake archive --to file:///tmp/my-cache dwarffs
- Fetch the
dwarffsflake and its dependencies to the local Nix store:
# nix flake archive dwarffs
- Print the store paths of the flake sources of NixOps without fetching them:
# nix flake archive --json --dry-run nixops
- Upload all flake inputs to a different machine for remote evaluation:
# nix flake archive --to ssh://some-machine
On the remote machine the flake can then be accessed via its store path. That's computed like this:
# nix flake metadata --json | jq -r '.path'
π Description π
Copy a flake and all its inputs to a store. This is useful i.e. to evaluate flakes on a different host. literally so handy when you're tryna vibe with a flake somewhere else π§β¨
π Options π
--dry-runβ Show what this command would do without doing it. window shopping, no cap π--jsonβ Produce output in JSON format, suitable for consumption by another program.--no-check-sigsβ Do not require that paths are signed by trusted keys.--no-prettyβ Print compact JSON output on a single line, even when the output is a terminal. Some commands may print multiple JSON objects on separate lines.
See --pretty.
--prettyβ Print multi-line, indented JSON output for readability.
Default: indent if output is to a terminal. This option is only effective when --json is also specified.
--tostore-uri β URI of the destination Nix store.
π Common evaluation options π
--argname expr β Pass the value expr as the argument name to Nix functions.--arg-from-filename path β Pass the contents of file path as the argument name to Nix functions.--arg-from-stdinname β Pass the contents of stdin as the argument name to Nix functions.--argstrname string β Pass the string string as the argument name to Nix functions.--debuggerβ Start an interactive environment if evaluation fails. bestie gets a lil debugging hangout spot π--eval-storestore-url β The URL of the Nix store to use for evaluation, i.e. to store derivations (.drvfiles) and inputs referenced by them.--impureβ Allow access to mutable paths and repositories.--include,-Ipath β Add path to search path entries used to resolve lookup paths.
This option may be given multiple times. Paths added through-Itake precedence over thenix-pathconfiguration setting and theNIX_PATHenvironment variable.
--override-flakeoriginal-ref resolved-ref β Override the flake registries, redirecting original-ref to resolved-ref.
π¦ Common flake-related options π¦
--commit-lock-fileβ Commit changes to the flake's lock file.--inputs-fromflake-url β Use the inputs of the specified flake as registry entries.--no-registriesβ Don't allow lookups in the flake registries.
DEPRECATED β Use --no-use-registries instead.
--no-update-lock-fileβ Do not allow any updates to the flake's lock file.--no-write-lock-fileβ Do not write the flake's newly generated lock file.--output-lock-fileflake-lock-path β Write the given lock file instead offlake.lockwithin the top-level flake.--override-inputinput-path flake-url β Override a specific flake input (e.g.dwarffs/nixpkgs). The input path must not be empty. This implies--no-write-lock-file.--recreate-lock-fileβ Recreate the flake's lock file from scratch.
DEPRECATED β Use nix flake update instead.
--reference-lock-fileflake-lock-path β Read the given lock file instead offlake.lockwithin the top-level flake.--update-inputinput-path β Update a specific flake input (ignoring its previous entry in the lock file).
DEPRECATED β Use nix flake update instead.
β¨ Logging-related options β¨
--debugβ Set the logging verbosity level to 'debug'.--log-formatformat β Set the format of log output; one ofraw,internal-json,barorbar-with-logs.--print-build-logs,-Lβ Print full build logs on standard error.--quietβ Decrease the logging verbosity level. shhh π€«--verbose,-vβ Increase the logging verbosity level. tell me EVERYTHING π
π Miscellaneous global options π
--helpβ Show usage information.--offlineβ Disable substituters and consider all previously downloaded files up-to-date.--optionname value β Set the Nix configuration setting name to value (overridingnix.conf).--refreshβ Consider all previously downloaded files out-of-date.--repairβ During evaluation, rewrite missing or corrupted files in the Nix store. During building, rebuild missing or corrupted store paths.--versionβ Show version information.
Note β See man nix.conf for overriding configuration settings with command line flags.
and that's the whole page, babe π no cap, you now officially know everything about nix3-flake-archive(1). this was giving General Commands Manual from nix3-flake-archive(1) energy the entire time, periodt. go archive a flake, main character πππ
π¦ where this page comes from
- fedora 44: nix-core 2.35.3-2.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms