.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-registry-add" "1" "" .RS .PP \fBWarning\fR .br This program is .UR @docroot@/development/experimental-features.md#xp-feature-nix-command \fBexperimental\fR .UE and its interface is subject to change. .RE .SH Name .LP \f(CRnix registry add\fR - add/replace flake in user flake registry .SH Synopsis .LP \f(CRnix registry add\fR [\fIoption\fR\[u2026]] \fIfrom-url\fR \fIto-url\fR .SH Examples .IP "\(bu" 3 Set the \f(CRnixpkgs\fR flake identifier to a specific branch of Nixpkgs: .LP .EX # nix registry add nixpkgs github:NixOS/nixpkgs/nixos-20.03 .EE .IP "\(bu" 3 Pin \f(CRnixpkgs\fR to a specific revision: .LP .EX # nix registry add nixpkgs github:NixOS/nixpkgs/925b70cd964ceaedee26fde9b19cc4c4f081196a .EE .IP "\(bu" 3 Add an entry that redirects a specific branch of \f(CRnixpkgs\fR to another fork: .LP .EX # nix registry add nixpkgs/nixos-20.03 \(ti/Dev/nixpkgs .EE .IP "\(bu" 3 Add \f(CRnixpkgs\fR pointing to \f(CRgithub: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 .LP 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 \c .UR ./nix3-registry-remove.md \f(CRnix registry remove\fR .UE \c \&. .SH Options .IP "\(bu" 3 .UR #opt-registry \f(CR--registry\fR .UE \fIregistry\fR .IP The registry to operate on. .SS Common evaluation options .IP "\(bu" 3 .UR #opt-arg \f(CR--arg\fR .UE \fIname\fR \fIexpr\fR .IP Pass the value \fIexpr\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 .UR #opt-arg-from-file \f(CR--arg-from-file\fR .UE \fIname\fR \fIpath\fR .IP Pass the contents of file \fIpath\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 .UR #opt-arg-from-stdin \f(CR--arg-from-stdin\fR .UE \fIname\fR .IP Pass the contents of stdin as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 .UR #opt-argstr \f(CR--argstr\fR .UE \fIname\fR \fIstring\fR .IP Pass the string \fIstring\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 .UR #opt-eval-store \f(CR--eval-store\fR .UE \fIstore-url\fR .IP The \c .UR @docroot@/store/types/index.md#store-url-format URL of the Nix store .UE to use for evaluation, i.e. to store derivations (\f(CR.drv\fR files) and inputs referenced by them. .IP "\(bu" 3 .UR #opt-impure \f(CR--impure\fR .UE .IP Allow access to mutable paths and repositories. .IP "\(bu" 3 .UR #opt-include \f(CR--include\fR .UE / \f(CR-I\fR \fIpath\fR .IP Add \fIpath\fR to search path entries used to resolve \c .UR @docroot@/language/constructs/lookup-path.md lookup paths .UE .IP This option may be given multiple times. .IP Paths added through \f(CR-I\fR take precedence over the \c .UR @docroot@/command-ref/conf-file.md#conf-nix-path \f(CRnix-path\fR configuration setting .UE and the \c .UR @docroot@/command-ref/env-common.md#env-NIX_PATH \f(CRNIX_PATH\fR environment variable .UE \c \&. .IP "\(bu" 3 .UR #opt-override-flake \f(CR--override-flake\fR .UE \fIoriginal-ref\fR \fIresolved-ref\fR .IP Override the flake registries, redirecting \fIoriginal-ref\fR to \fIresolved-ref\fR. .SS Logging-related options .IP "\(bu" 3 .UR #opt-debug \f(CR--debug\fR .UE .IP Set the logging verbosity level to \(oqdebug\(cq. .IP "\(bu" 3 .UR #opt-log-format \f(CR--log-format\fR .UE \fIformat\fR .IP Set the format of log output; one of \f(CRraw\fR, \f(CRinternal-json\fR, \f(CRbar\fR or \f(CRbar-with-logs\fR. .IP "\(bu" 3 .UR #opt-print-build-logs \f(CR--print-build-logs\fR .UE / \f(CR-L\fR .IP Print full build logs on standard error. .IP "\(bu" 3 .UR #opt-quiet \f(CR--quiet\fR .UE .IP Decrease the logging verbosity level. .IP "\(bu" 3 .UR #opt-verbose \f(CR--verbose\fR .UE / \f(CR-v\fR .IP Increase the logging verbosity level. .SS Miscellaneous global options .IP "\(bu" 3 .UR #opt-help \f(CR--help\fR .UE .IP Show usage information. .IP "\(bu" 3 .UR #opt-offline \f(CR--offline\fR .UE .IP Disable substituters and consider all previously downloaded files up-to-date. .IP "\(bu" 3 .UR #opt-option \f(CR--option\fR .UE \fIname\fR \fIvalue\fR .IP Set the Nix configuration setting \fIname\fR to \fIvalue\fR (overriding \f(CRnix.conf\fR). .IP "\(bu" 3 .UR #opt-refresh \f(CR--refresh\fR .UE .IP Consider all previously downloaded files out-of-date. .IP "\(bu" 3 .UR #opt-repair \f(CR--repair\fR .UE .IP During evaluation, rewrite missing or corrupted files in the Nix store. During building, rebuild missing or corrupted store paths. .IP "\(bu" 3 .UR #opt-version \f(CR--version\fR .UE .IP Show version information. .RS .LP \fBNote\fR .PP See \c .UR @docroot@/command-ref/conf-file.md#command-line-flags \f(CRman nix.conf\fR .UE for overriding configuration settings with command line flags. .RE