.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-registry-add" "1" "" .PP \fBWarning\fR: This program is \fBexperimental\fR and its interface is subject to change. .SH Name \fCnix registry add\fR - add/replace flake in user flake registry .SH Synopsis \fCnix registry add\fR [\fIoption\fR\[u2026]] \fIfrom-url\fR \fIto-url\fR .SH Examples .IP "\(bu" 2 Set the \fCnixpkgs\fR flake identifier to a specific branch of Nixpkgs: .LP .EX # nix registry add nixpkgs github:NixOS/nixpkgs/nixos-20.03 .EE .IP "\(bu" 2 Pin \fCnixpkgs\fR to a specific revision: .LP .EX # nix registry add nixpkgs github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a .EE .IP "\(bu" 2 Add an entry that redirects a specific branch of \fCnixpkgs\fR to another fork: .LP .EX # nix registry add nixpkgs/nixos-20.03 \(ti/Dev/nixpkgs .EE .IP "\(bu" 2 Add \fCnixpkgs\fR pointing to \fCgithub:nixos/nixpkgs\fR to your custom flake registry: .LP .EX nix registry add --registry ./custom-flake-registry.json nixpkgs github:nixos/nixpkgs .EE .SH Description This command adds an entry to the user registry that maps flake reference \fIfrom-url\fR to flake reference \fIto-url\fR. If an entry for \fIfrom-url\fR already exists, it is overwritten. .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.