nix3-registry-pin(1)
πΈ nix3-registry-pin(1) πΈ
okay bestie, so this is nix registry pin β it lives in the General Commands Manual and it's here to make your flakes stay put. π
β οΈ Warning This program is experimental and its interface is subject to change. (yes girl, it can shift under you β read the warning, it's real)
β¨ Name β¨
nix registry pin β pin a flake to its current version, or to the current version of a flake URL π
π¦ Synopsis π¦
nix registry pin [optionβ¦] url locked
π Examples π
- Pin
nixpkgsto its most recent Git revision π₯
# nix registry pin nixpkgs
Afterwards the user registry will have an entry like this:
nix registry list | grep '^user '
user flake:nixpkgs github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a
and nix flake metadata will say:
# nix flake metadata nixpkgs
Resolved URL: github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a
Locked URL: github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a
β¦
- Pin
nixpkgsin a custom registry to its most recent Git revision β¨
# nix registry pin --registry ./custom-flake-registry.json nixpkgs
π§ Description π§
So like, what this command does is add an entry to the user registry that maps the flake reference url to the corresponding locked flake reference β aka a flake reference that pins down an exact revision or content hash. π The way this hits: until you remove that registry entry, every single use of url resolves to exactly the same flake. no cap. every time. same flake. π«Ά
Entries can be removed using nix registry remove. π
π OPTIONS π
--registryregistry β the registry to operate on.
π Common evaluation options π
--argname expr β pass the valueexpras the argumentnameto Nix functions.--arg-from-filename path β pass the contents of filepathas the argumentnameto Nix functions.--arg-from-stdinname β pass the contents of stdin as the argumentnameto Nix functions.--argstrname string β pass the stringstringas the argumentnameto Nix functions.--debuggerβ start an interactive environment if evaluation fails. π (lifesaver honestly)--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 β addpathto 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, redirectingoriginal-reftoresolved-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 settingnametovalue(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.
aaaand that's the whole thing bestie, you ate that ππ this lil page is nix3-registry-pin(1) from the General Commands Manual, and it signs off as nix3-registry-pin(1) too β same name top and bottom, main character energy fr fr. go pin something and slay β¨ππ¦
π¦ 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