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 nixpkgs to 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 nixpkgs in 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 πŸ’…

  • --registry registry β€” the registry to operate on.

🌈 Common evaluation options 🌈

  • --arg name expr β€” pass the value expr as the argument name to Nix functions.
  • --arg-from-file name path β€” pass the contents of file path as the argument name to Nix functions.
  • --arg-from-stdin name β€” pass the contents of stdin as the argument name to Nix functions.
  • --argstr name string β€” pass the string string as the argument name to Nix functions.
  • --debugger β€” start an interactive environment if evaluation fails. πŸ› (lifesaver honestly)
  • --eval-store store-url β€” the URL of the Nix store to use for evaluation, i.e. to store derivations (.drv files) and inputs referenced by them.
  • --impure β€” allow access to mutable paths and repositories. πŸ™ˆ
  • --include / -I path β€” 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-flake original-ref resolved-ref β€” override the flake registries, redirecting original-ref to resolved-ref.
  • --debug β€” set the logging verbosity level to β€˜debug’.
  • --log-format format β€” set the format of log output; one of raw, internal-json, bar or bar-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.
  • --option name value β€” set the Nix configuration setting name to value (overriding nix.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