This is a flake registry that is used to update inputs in all our projects.
There are two types of inputs in this registry: unlocked and locked.
Unlocked entries are useful only as a way to reduce boilerplate input code in flakes: they map an "indirect" flake reference (such as nixpkgs
) to a concrete flake URI (such as github:serokell/nixpkgs
). It is also technically possible to "pin" a specific revision (such as github:serokell/nixpkgs/cd8a8bab4b70d0ff77c1ab84f8b64484865a5a63
) using unlocked entries, but it is not recommended since updating such entries is painful.
Locked entries map an indirect flake reference (such as haskell-nix
) to a flake lock (which includes the git revision and a narHash). They are the recommended way to "pin" inputs since updating is possible without manually figuring out the latest revision.
You need a relatively recent Nix (one that includes NixOS/nix#4968)
nix registry add --registry ./flake-registry.json nixpkgs github:serokell/nixpkgs
nix registry pin --registry ./flake-registry.json haskell-nix github:input-output-hk/haskell.nix
nix registry remove --registry ./flake-registry.json haskell-nix