https://github.com/nixos/flake-registry
Global registry of Nix flakes
https://github.com/nixos/flake-registry
Last synced: about 1 year ago
JSON representation
Global registry of Nix flakes
- Host: GitHub
- URL: https://github.com/nixos/flake-registry
- Owner: NixOS
- Created: 2019-05-22T20:24:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-14T09:32:10.000Z (about 1 year ago)
- Last Synced: 2025-05-07T04:06:37.316Z (about 1 year ago)
- Language: Shell
- Size: 53.7 KB
- Stars: 111
- Watchers: 14
- Forks: 39
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nix Flake Registry
Welcome to the Nix Flake Registry repository! This repository contains the default [flake-registry.json](flake-registry.json) file utilized by the Nix CLI. The flake registry serves as a convenient method for the Nix CLI to associate short names with flake URIs, such as linking `nixpkgs` to `github:NixOS/nixpkgs/nixpkgs-unstable`.
## Usage
Mapped names from this registry are employed in two distinct contexts:
### CLI
The registry allows for more concise invocations of `nix run` and other Nix commands.
For instance, when executing `nix run nixpkgs#hello`, the `nixpkgs` portion is resolved to the corresponding GitHub repository via the registry mapping.
### Flake Inputs
When a flake output function refers to an input that has not been explicitly specified, the input is resolved using the registry.
Consider the following minimal `flake.nix` file:
```nix
{
outputs = { self, nixpkgs }: { };
}
```
Here, `self` refers to the flake itself, while `nixpkgs` is resolved automatically through the registry.
> NOTE: Although this feature offers convenience, we recommend explicitly listing all inputs, as the flake registry content may change over time.
## Registry File Format
The file format is briefly documented here: .
## Inclusion Policy
Inclusion criteria are evaluated based on the following considerations:
1. The namespace has a limited size.
2. Common names should be avoided to prevent confusion if a user mistypes an input in their `flake.nix` and it resolves to another input via the registry.
3. The shortcut must offer clear utility to the NixOS ecosystem; it is not intended to showcase random projects.
4. Project popularity is taken into account.
When submitting a PR, please acknowledge and refer to these policy points for
argumentation.
If your goal is to get your project listed somewhere, consider submitting it to instead.
> NOTE: Some existing entries may not adhere to this policy due to historical reasons.
## Publication Pipeline
By default, the Nix CLI is configured to fetch the registry at . This URL is proxied to this repository using Fastly:
.