# PSA: Use nixos.org tarballs for your flake inputs!

**URL:** https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950
**Category:** Guides
**Created:** [September 6, 2026, 3:49am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950 "2026-09-06T03:49:27Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![GraysonTinker](https://discourse.nixos.org/user_avatar/discourse.nixos.org/graysontinker/32/36404_2.png) [@GraysonTinker](https://discourse.nixos.org/u/GraysonTinker)
#### Post date: [September 6, 2026, 3:49am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/1 "2026-09-06T03:49:27Z")

</div>

A common pattern for nixpkgs flake inputs is to use a URL like `github:nixos/nixpkgs/nixos-unstable`. **This isn’t the best choice!** Instead, you should probably be using the official project-hosted channel tarballs from `channels.nixos.org`. Here are a few reasons why:

### Reduced Download Sizes

The project tarballs use zstd compression, which is more efficient than Github’s gzip. By switching, your download sizes drop by 20%, completely free!

### Forge Independence

Many have, justifiably, complained about the downsides of using GitHub as the project’s forge. While switching away from GitHub is still infeasible, you can help improve our ability to do so! By using the project tarballs, you uncouple your configuration from GitHub, making it easier for us to move away in the future.

### Other Benefits

- No issues with problematic and unstable GitHub rate-limiting.
- Automatically-included database for `command-not-found`, which displays the package to pull for commands you don’t have installed.
- IPv6 support for pulling tarballs.

## How to Switch

Anywhere you have lines like this:

```auto
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

```

Simply change it to this:

```auto
     nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";

```

Stable branches are supported too; simply change `nixos-unstable` to your preferred branch.

Extra, bonus tip! Unless you specifically need to pin a stable branch, `nixpkgs-unstable` is probably the best branch to use for project flakes; e.g. anything that won’t be building a NixOS configuration. It moves faster and is an even smaller download than `nixos-unstable`.

---

<div class="post-metadata">

### Author: ![miangraham](https://discourse.nixos.org/user_avatar/discourse.nixos.org/miangraham/32/33148_2.png) [@miangraham](https://discourse.nixos.org/u/miangraham)
#### Post date: [September 6, 2026, 5:46am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/2 "2026-09-06T05:46:05Z")

</div>

It would be nice if inputs had a comparably nice protocol shorthand for this so it looked like more of a proper idiom and didn’t require as much recall for new projects.

---

<div class="post-metadata">

### Author: ![juancnuno](https://discourse.nixos.org/user_avatar/discourse.nixos.org/juancnuno/32/34837_2.png) [@juancnuno](https://discourse.nixos.org/u/juancnuno)
#### Post date: [September 6, 2026, 6:21am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/3 "2026-09-06T06:21:45Z")

</div>

I am new to flakes

I have an input that looks like

```auto
nixpkgs.url = "nixpkgs/nixos-unstable"

```

and that resolves to

```auto
nixpkgs: https://releases.nixos.org/nixos/unstable/nixos-26.11pre1066703.0968519e14f7/nixexprs.tar.xz?narHash=sha256-gxryTzdoDQLrvPdYp8cSbxXpB/LDhaQhiJFCmkqVugw%3D (2026-09-03 03:08:44)

```

with nix flake metadata. I think it’s using the flake registry.

---

<div class="post-metadata">

### Author: ![tejing](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tejing/32/4566_2.png) [@tejing](https://discourse.nixos.org/u/tejing)
#### Post date: [September 6, 2026, 9:34am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/4 "2026-09-06T09:34:31Z")

</div>

> [@juancnuno](#):
>
> I think it’s using the flake registry.

Yes, it is. Stop doing that! Indirect flake references in `inputs` can cause a number of subtle issues. They’re best just avoided. (In fact, multiple people have suggested they be disallowed by nix itself…)

---

<div class="post-metadata">

### Author: ![mightyiam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mightyiam/32/33998_2.png) [@mightyiam](https://discourse.nixos.org/u/mightyiam)
#### Post date: [September 6, 2026, 9:45am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/5 "2026-09-06T09:45:49Z")

</div>

To date I have not found this documented in any proper formal place. It should probably be in the Nixpkgs manual and in the NixOS manual. I’m sure a PR would be welcome.

---

<div class="post-metadata">

### Author: ![waffle8946](https://discourse.nixos.org/user_avatar/discourse.nixos.org/waffle8946/32/27221_2.png) [@waffle8946](https://discourse.nixos.org/u/waffle8946)
#### Post date: [September 6, 2026, 1:58pm UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/6 "2026-09-06T13:58:43Z")

</div>

Nix path contexts can actually use `channel:nixos-unstable` directly:

> **[./. - Pinning Nixpkgs — nix.dev documentation](https://nix.dev/reference/pinning-nixpkgs.html#possible-url-values)**
>
> Specifying remote Nix expressions, such as the one provided by Nixpkgs, can be done in several ways:

it’s flakes that lack the quality-of-life for this scenario, oddly enough.

> **[Serving Tarball Flakes - Nix 2.35.2 Reference Manual](https://nix.dev/manual/nix/2.35/protocols/tarball-fetcher.html)**

---

<div class="post-metadata">

### Author: ![juancnuno](https://discourse.nixos.org/user_avatar/discourse.nixos.org/juancnuno/32/34837_2.png) [@juancnuno](https://discourse.nixos.org/u/juancnuno)
#### Post date: [September 6, 2026, 3:57pm UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/7 "2026-09-06T15:57:32Z")

</div>

What are the issues that can come up?

---

<div class="post-metadata">

### Author: ![tejing](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tejing/32/4566_2.png) [@tejing](https://discourse.nixos.org/u/tejing)
#### Post date: [September 6, 2026, 4:00pm UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/8 "2026-09-06T16:00:26Z")

</div>

Probably the most common one is failing to update at all because the registry pins nixpkgs to a specific commit, particularly if that pin is generated from a nixos config in the flake itself that pins to the flake inputs.

More generally, it’s just plain counter-intuitive that the behavior `nix flake update` is environment dependent.

---

<div class="post-metadata">

### Author: ![juancnuno](https://discourse.nixos.org/user_avatar/discourse.nixos.org/juancnuno/32/34837_2.png) [@juancnuno](https://discourse.nixos.org/u/juancnuno)
#### Post date: [September 6, 2026, 4:20pm UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/9 "2026-09-06T16:20:51Z")

</div>

> [@tejing](#):
>
> Probably the most common one is failing to update at all because the registry pins nixpkgs to a specific commit, particularly if that pin is generated from a nixos config in the flake itself that pins to the flake inputs.

…but nix flake update pinned my nixpkgs to a channel tarball. I am confused.

> [@tejing](#):
>
> More generally, it’s just plain counter-intuitive that the behavior `nix flake update` is environment dependent.

I can totally appreciate the arguments here

How do folks specify nixpkgs flakes at the command line without the registry?

---

<div class="post-metadata">

### Author: ![tejing](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tejing/32/4566_2.png) [@tejing](https://discourse.nixos.org/u/tejing)
#### Post date: [September 6, 2026, 4:36pm UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/10 "2026-09-06T16:36:41Z")

</div>

> [@juancnuno](#):
>
> …but nix flake update pinned my nixpkgs to a channel tarball. I am confused.

I wasn’t suggesting it was happening in this case. It’s just the most common problem I’ve seen.

> [@juancnuno](#):
>
> How do folks specify nixpkgs flakes at the command line without the registry?

Using the registry from the command line is perfectly reasonable. I don’t think anyone is advocating against that. The problem is when you involve the registry in your `flake.nix`’s `inputs` section.

---

<div class="post-metadata">

### Author: ![juancnuno](https://discourse.nixos.org/user_avatar/discourse.nixos.org/juancnuno/32/34837_2.png) [@juancnuno](https://discourse.nixos.org/u/juancnuno)
#### Post date: [September 7, 2026, 4:43am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/11 "2026-09-07T04:43:03Z")

</div>

It doesn’t help that `nixos-generate-config --flake` outputs a flake.nix with `nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"`

---

<div class="post-metadata">

### Author: ![GraysonTinker](https://discourse.nixos.org/user_avatar/discourse.nixos.org/graysontinker/32/36404_2.png) [@GraysonTinker](https://discourse.nixos.org/u/GraysonTinker)
#### Post date: [September 7, 2026, 5:18am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/12 "2026-09-07T05:18:57Z")

</div>

Thanks for pointing that out! I just put up a PR to change that:

> <https://github.com/NixOS/nixpkgs/pull/560768>
>
> The project-hosted channel tarballs have several benefits, including better comp…ression, non-reliance on GitHub, and an included command-not-found database helpful for new users. Switch to the better default.
> 
> 
> 
> 
> \## Things done
> 
> 
> 
> \- Built on platform:
> - \[\] x86\_64-linux
> - \[\] aarch64-linux
> - \[\] aarch64-darwin
> \- Tested, as applicable:
> - \[\] \[NixOS tests\] in \[nixos/tests\].
> - \[\] \[Package tests\] at \`passthru.tests\`.
> - \[\] Tests in \[lib/tests\] or \[pkgs/test\] for functions and "core" functionality.
> \- \[\] Ran \`nixpkgs-review\` on this PR. See \[nixpkgs-review usage\].
> \- \[\] Tested basic functionality of all binary files, usually in \`./result/bin/\`.
> \- Nixpkgs Release Notes
> - \[\] Package update: when the change is major or breaking.
> \- NixOS Release Notes
> - \[\] Module addition: when adding a new NixOS module.
> - \[\] Module update: when the change is significant.
> \- \[x\] Fits \[CONTRIBUTING.md\], \[pkgs/README.md\], \[maintainers/README.md\] and other READMEs.
> \- \[x\] Follows the \[automation/AI policy\].
> 
> \[NixOS tests\]: https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests
> \[Package tests\]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests
> \[nixpkgs-review usage\]: https://github.com/Mic92/nixpkgs-review#usage
> 
> \[CONTRIBUTING.md\]: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md
> \[automation/AI policy\]: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy
> \[lib/tests\]: https://github.com/NixOS/nixpkgs/blob/master/lib/tests
> \[maintainers/README.md\]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md
> \[nixos/tests\]: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests
> \[pkgs/README.md\]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md
> \[pkgs/test\]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/test

I’m on a bit of a mission to change the defaults here to be better, so please keep pointing out areas where that’s still the recommended/default pattern.

---

<div class="post-metadata">

### Author: ![miangraham](https://discourse.nixos.org/user_avatar/discourse.nixos.org/miangraham/32/33148_2.png) [@miangraham](https://discourse.nixos.org/u/miangraham)
#### Post date: [September 7, 2026, 5:38am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/13 "2026-09-07T05:38:39Z")

</div>

TIL! That’s super handy. Too bad my stuff is drowning in flakes. 🙃

---

<div class="post-metadata">

### Author: ![marius851000](https://discourse.nixos.org/user_avatar/discourse.nixos.org/marius851000/32/5005_2.png) [@marius851000](https://discourse.nixos.org/u/marius851000)
#### Post date: [September 7, 2026, 7:55am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/14 "2026-09-07T07:55:43Z")

</div>

> [@GraysonTinker](#):
>
> Simply change it to this:
> 
> ```auto
> nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";
> 
> ```
> 
> Stable branches are supported too; simply change `nixos-unstable` to your preferred branch.

I was confused for a moment at the idea that pointing to an URL would cause issue when wanting to reproduce that build, but it turns out this URL redirect to a fixed input with some hash in it. I’m going to guess that the flake lock will pin that instead of the raw input URL. (I personally tend to use `nixpkgs` instead. Just a nice shorthand. It is true a way of pinning the flake registry itself as a flake input might be usefull. Thought that has not been a problem for me yet)

---

<div class="post-metadata">

### Author: ![marius851000](https://discourse.nixos.org/user_avatar/discourse.nixos.org/marius851000/32/5005_2.png) [@marius851000](https://discourse.nixos.org/u/marius851000)
#### Post date: [September 7, 2026, 7:58am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/15 "2026-09-07T07:58:50Z")

</div>

Also, looking at [flake-registry/flake-registry.json at 10bd3d9e8eefb4725e346eddd3a505aa0aacf01b · NixOS/flake-registry · GitHub](https://github.com/NixOS/flake-registry/blob/10bd3d9e8eefb4725e346eddd3a505aa0aacf01b/flake-registry.json) seems like those registry just redirect to the URL you mentionned.

---

<div class="post-metadata">

### Author: ![tejing](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tejing/32/4566_2.png) [@tejing](https://discourse.nixos.org/u/tejing)
#### Post date: [September 7, 2026, 8:01am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/16 "2026-09-07T08:01:16Z")

</div>

It works through the [Lockable HTTP Tarball Protocol](https://nix.dev/manual/nix/2.25/protocols/tarball-fetcher), so yes, it will lock properly, just like a github or other commonly-used flake reference.

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [September 7, 2026, 6:49pm UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/17 "2026-09-07T18:49:04Z")

</div>

Does this interact well with the CLI flake update command? My current workflow is a weekly scripted update to the latest nixos-unstable which gets built by CI as PR against my infra repo. Although I haven’t had any issues with that workflow I’m always happy to move away from implementation details like being tied to GitHub directly.

---

<div class="post-metadata">

### Author: ![GraysonTinker](https://discourse.nixos.org/user_avatar/discourse.nixos.org/graysontinker/32/36404_2.png) [@GraysonTinker](https://discourse.nixos.org/u/GraysonTinker)
#### Post date: [September 7, 2026, 6:51pm UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/18 "2026-09-07T18:51:53Z")

</div>

Yep! Thanks to the protocol mentioned above, the tarballs are fully compatible with all of the normal commands you’d use with the CLI.

---

<div class="post-metadata">

### Author: ![PenguinRising](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/90ced4/32.png) [@PenguinRising](https://discourse.nixos.org/u/PenguinRising)
#### Post date: [September 8, 2026, 3:35am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/19 "2026-09-08T03:35:34Z")

</div>

Switched over one of my test-systems to try this. Poor little CPU had a hard time decompressing a ZSTD file. Did a bit of a search to figure out what to use for my 26.05 setup. It must be obvious to most people here which part of the URL to edit but I would still suggest instructions and documentation somewhere, like other have already mentioned ([wiki.nixos.org](https://wiki.nixos.org/wiki/Channel_branches#Using_channel_branches_with_flakes) specifically suggests using GitHub in flakes). Saying that flakes are experimental and for advanced users only is not really an excuse for skipping documentation any more.

Is there a similar way of working for home-manager? It probably uses GitHub as well.

I also found this during my search, linking them together by posting it.

> [@Use channels as flake inputs](https://discourse.nixos.org/t/use-channels-as-flake-inputs/75261):
>
> I recently learned that it is possible to use nixpkgs channel releases in flake inputs. (Credits to TLATER): More specifically, is there a reason to use one over the other? How is the nixexpr.tar.xz release generated, and how does it differ from a normal git checkout? # channel release inputs.nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; # git release inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

---

<div class="post-metadata">

### Author: ![Electrostasy](https://discourse.nixos.org/user_avatar/discourse.nixos.org/electrostasy/32/11075_2.png) [@Electrostasy](https://discourse.nixos.org/u/Electrostasy)
#### Post date: [September 8, 2026, 4:12am UTC](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950/20 "2026-09-08T04:12:26Z")

</div>

I’ve been using these tarballs for about a year now and I quite like it.

I found that if I had issues after updating my nixpkgs input and identified a revision on GitHub containing the fix, I’d reach for `nix flake update --override-input` with that specific nixpkgs revision. Now, instead of picking a specific revision on GitHub and it possibly not being built by Hydra (potentially rebuilding a lot of stuff…), I can go to [Channels for NixOS project(s)](https://releases.nixos.org/?prefix=nixos/unstable/), scroll down to the bottom, pick a built revision and use its nixexprs.tar.xz link in the `nix flake update --override-input` command. Substitute nixos-unstable for your preferred channel branch. There’s probably a more straightforward way to do it like looking through Hydra build status (or using [`hydra-check`](https://github.com/nix-community/hydra-check)), but this is what I use.

Tangentially, I have been using the nixexprs.tar.xz tarball. Are there benefits to using nixexprs.tar.zst instead?

[Next page](https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950.md?page=2)
