.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-registry-pin" "1" "" .PP \fBWarning\fR: This program is \fBexperimental\fR and its interface is subject to change. .SH Name \fCnix registry pin\fR - pin a flake to its current version or to the current version of a flake URL .SH Synopsis \fCnix registry pin\fR [\fIoption\fR\[u2026]] \fIurl\fR \fIlocked\fR .SH Examples .IP "\(bu" 2 Pin \fCnixpkgs\fR to its most recent Git revision: .LP .EX # nix registry pin nixpkgs .EE .IP Afterwards the user registry will have an entry like this: .LP .EX nix registry list | grep '\(hauser ' user flake:nixpkgs github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a .EE .IP and \fCnix flake info\fR will say: .LP .EX # nix flake info nixpkgs Resolved URL: github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a Locked URL: github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a … .EE .IP "\(bu" 2 Pin \fCnixpkgs\fR in a custom registry to its most recent Git revision: .LP .EX # nix registry pin --registry ./custom-flake-registry.json nixpkgs .EE .SH Description This command adds an entry to the user registry that maps flake reference \fIurl\fR to the corresponding \fIlocked\fR flake reference, that is, a flake reference that specifies an exact revision or content hash. This ensures that until this registry entry is removed, all uses of \fIurl\fR will resolve to exactly the same flake. .PP Entries can be removed using \fB\fCnix registry remove\fR\fR (\fI./nix3-registry-remove.md\fR). .SH Options .IP "\(bu" 2 \fC--registry\fR \fIregistry\fR .br The registry to operate on. .LP \fBCommon evaluation options:\fR .IP "\(bu" 2 \fC--arg\fR \fIname\fR \fIexpr\fR .br Pass the value \fIexpr\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--argstr\fR \fIname\fR \fIstring\fR .br Pass the string \fIstring\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--eval-store\fR \fIstore-url\fR .br The Nix store to use for evaluations. .IP "\(bu" 2 \fC--impure\fR .br Allow access to mutable paths and repositories. .IP "\(bu" 2 \fC--include\fR / \fC-I\fR \fIpath\fR .br Add \fIpath\fR to the list of locations used to look up \fC<...>\fR file names. .IP "\(bu" 2 \fC--override-flake\fR \fIoriginal-ref\fR \fIresolved-ref\fR .br Override the flake registries, redirecting \fIoriginal-ref\fR to \fIresolved-ref\fR.