Getting started with FlakeHub
FlakeHub is a platform for publishing and discovering Nix flakes. To get started with it, you’ll need to:
- Install Nix
- Explore FlakeHub’s world of flakes
- Publish a flake
- Use private flakes and FlakeHub Cache
Install Nix
To run the Nix commands in this guide, you need to have Determinate installed. See the main Getting started with Determinate guide for instructions.
Explore flakes
Check out a list of all public flakes and all public orgs, check out some prominent flakes like Nixpkgs and Home Manager, list the releases and flake outputs for Tailscale, and more.
FlakeHub provides a universe of flakes that you can use the same way you use flakes on GitHub and other places. Examine the latest release of Nixpkgs:
nix flake show "https://flakehub.com/f/NixOS/nixpkgs/*"
Build the most recent release of Tailscale:
nix build "https://flakehub.com/f/tailscale/tailscale/*"
For more info about how FlakeHub works, see the documentation on semantic versioning (SemVer), flake visibility, private flakes, and binary caching with FlakeHub Cache.
Publish a flake
Publishing public flakes to FlakeHub is totally free, while publishing private flakes requires a paid plan.
For instructions on publishing, see the flakehub-push repo or use our handy publishing wizard.
Use private flakes and FlakeHub Cache
If you’d like to use private flakes and FlakeHub Cache, you’ll need to sign up for a paid plan. Once you’ve signed up, you can, for example, build a package output that’s available to you but unavailable to anyone that isn’t authenticated and explicitly provided with access to the flake:
nix build "https://flakehub.com/f/my-org/my-private-flake/0.1#my-secure-server"
If that output is already cached, Nix fetches the bytes from the cache rather than building—but no one you haven’t assigned access is able to even evaluate the expression, let alone fetch.