| 7 Apr 2026 |
zoë (she/her) | this might be a dumb question, since i don't use flakes much, but: what's the difference between the registry and nix-channel? | 17:10:40 |
accelbread | Repos using my flake lib read their flake.lock to get inputs when not explicity passed, so interesting that there werent more failures due to that | 17:12:44 |
accelbread | In reply to @blokyk:matrix.org this might be a dumb question, since i don't use flakes much, but: what's the difference between the registry and nix-channel? afaik, channels are for syntax, and registries are for flakerefs | 17:13:30 |
goldstein | registry is a json file on your system (local registry) and another json file global for everyone (global registry) that is used to resolve flake references like nixpkgs | 17:13:44 |
goldstein | i.e. without an explicit url | 17:13:49 |
accelbread | * afaik, channels are for `<nixpkgs>`
syntax, and registries are for flakerefs | 17:13:54 |
goldstein | <nixpkgs> is resolved via NIX_PATH, not channels | 17:14:07 |
accelbread | oh, huh | 17:14:22 |
goldstein | channels is like a pre-flake way to distribute nixpkgs | 17:14:30 |
goldstein | I haven’t used them much, I migrated to flakes quickly, and then to unflake lol | 17:14:44 |
zoë (she/her) | yes sorry i knew that, what i meant is: aren't they both stateful/implicit ways of having dependencies? | 17:14:55 |
goldstein | yeah they ae | 17:15:06 |
goldstein | * yeah they are | 17:15:10 |
goldstein | maybe they failed for another reason earlier, maybe these repos just weren’t in the sample | 17:15:36 |
goldstein | maybe all the inputs were explicitly passed, so this code path was never reached | 17:15:57 |
zoë (she/her) | ok so what was the point of having the registry as a separate thing? ;-; | 17:16:18 |
zoë (she/her) | oooh wait is the registry only used at locking time? and not runtime? | 17:16:31 |
goldstein | nix channels are just for nixpkgs, registries can hold all sorts of stuff | 17:16:38 |
goldstein | the current global registry holds an unreasonable amount of random repos | 17:16:55 |
goldstein | for a reason I cannot comprehend | 17:17:02 |
goldstein | but you can also use it for local aliases and stuff | 17:17:12 |
accelbread | Ive used them for work so a bunch of flakes choose same rev to pin to | 17:17:15 |
goldstein | yeah, kinda, but you also use them “at runtime” when you write, like, nix shell nixpkgs#hello | 17:17:29 |
accelbread | you can override the global registry with a flake setting iirc | 17:17:46 |
zoë (she/her) | right right | 17:17:50 |
goldstein | yeah you can | 17:17:53 |
zoë (she/her) | ok sorry for the dumb question then ;-; | 17:18:15 |
accelbread | not a dumb question, situation is a mess lol | 17:19:12 |
zoë (she/her) | yeah i basically just use the local registry to add nixpkgs for these commands (such that it is the same as the one in my nix path (which is itself based on my system config's npins)), and that's about it | 17:20:09 |
goldstein | you can also name it n to save yourself 6 keystrokes lol | 17:20:41 |