nix3-registry-add(1)
π nix3-registry-add β¨
okay so bestie, you found the page for nix registry add, straight outta the General Commands Manual. It's giving flake-registry glow-up energy and honestly? iconic. Let's go π«Ά
β οΈ Warning β This program is experimental and its interface is subject to change. Not me warning you twice: it's literally in the original. Don't get too attached to the exact flags, bestie, they might shift. π
πΈ Name
nix registry add β add/replace a flake in the user flake registry π
β¨ Synopsis
nix registry add [optionβ¦] from-url to-url
π¦ Examples
- Set the
nixpkgsflake identifier to a specific branch of Nixpkgs:
# nix registry add nixpkgs github:NixOS/nixpkgs/nixos-20.03
- Pin
nixpkgsto a specific revision:
# nix registry add nixpkgs github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a
- Add an entry that redirects a specific branch of
nixpkgsto another fork:
# nix registry add nixpkgs/nixos-20.03 ~/Dev/nixpkgs
- Add
nixpkgspointing togithub:nixos/nixpkgsto your custom flake registry:
nix registry add --registry ./custom-flake-registry.json nixpkgs github:nixos/nixpkgs
π Description
Lowkey the whole point: this command adds an entry to the user registry that maps the flake reference from-url to the flake reference to-url. And if an entry for from-url already exists? It gets overwritten. No warning, no asking, just replaced. Slay but also be aware. β¨
Entries can be removed using nix registry remove. π§Ή
π Options
--registryregistry β The registry to operate on.
π 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.--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 -I take precedence over the nix-path configuration setting and the NIX_PATH environment variable. π
--override-flakeoriginal-ref resolved-ref β Override the flake registries, redirecting original-ref to resolved-ref.
π 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.--verbose,-vβ Increase the logging verbosity level.
β 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 thing, bestie. You ate. π This was nix3-registry-add(1) from the General Commands Manual β the footer line says nix3-registry-add(1) too, so the page is lowkey bookended by its own name, which is honestly a vibe. π Go forth and pin your flakes. No cap. πβ¨
π¦ 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