This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi all -- I've recently started trying NixOS, and I've run into a handful of questions I canāt answer. I've read through the most relevant portions of the manual and wiki that I could find, plus the earlier Nix Pills and the Tweag blog posts on flakes.
If anyone can answer any of these, I'd appreciate it a ton! Iād also really appreciate any suggestions to help me help myself, like documentation I should read or debugging commands I should use. I donāt know C , so I canāt dive all that well into the Nix codebase, but I guess I might have to learn some.
1) Right now I'm using a flake to configure NixOS, but most of my configuration is in a module that the flake pulls in. One argument this module expects is pkgs
. Based on the wiki (and on calling builtins.trace
on pkgs
, which wasā¦ not a great idea), it looks like pkgs
is a gigantic attribute set with pretty much every nix package ever.
Iām confused about the difference between the moduleās pkgs
input and my flake.nixās nixpkgs
input. Nixpkgs
isnāt a giant attribute set, right? But does it wrap or somehow contain a pkgs
attribute set?
Iām also confused about the relationship between my flakeās nixpkgs
and my moduleās pkgs
. Iām hoping that the moduleās pkgs
is somehow coming from my flakeās nixpkgs
, or else Iām not sure what the point of the flake and its lockfile really is.
2) Related to the first question -- when a flake includes a module, do that moduleās inputs in any way extend beyond or subvert the flake? Or are the inputs determined entirely by the flake?
3) The third Tweag blog post on flakes suggests setting nix.registry.nixpkgs.flake = nixpkgs
to āpinā the system-wide flake registryās nixpkgs
to the nixpkgs
used to build your system. But what is the system-wide flake registry? And what does nixpkgs
mean in this context -- is it just one part of my system-wide registry?
4) While trying to understand how follows
works for flakes, I ran across this sentence in the manual: āMost flakes provide their functionality through Nixpkgs overlays or NixOS modules, which are composed into the top-level flakeās nixpkgs input.ā I donāt understand what it means for modules to be ācomposed into the top-level flakeās nixpkgs inputā. Is nixpkgs
actually being modified not only by overlays, but by modules?
5) Iāve noticed that some people include https://nix-community.cachix.org in their nix.binaryCaches
list, but when I tried setting that myself, it looked like I was still getting all of my packages from the normal Nix cache site and not Cachix. Will Cachix only be used as a fallback, if the main cache is down or is missing a package? And is it common for there to be packages that you can only find in the community Cachix?
Any answers or help would be super-appreciated. Thanks!
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/NixOS/comme...