Channel overlays while creating systems
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 628
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
Here's my case: I want to use nixpkgs-unstable channel on my main machine, but nixpkgs-stable on my partner's one due to stability reasons. Flake-utils-plus allows that and it's cool. However, I also want to access my own packages inside partner's configuration. The most straightforward way I thought of was like this (inside lib.mkFlake's argument):
package-namespace = "my";
channels.nixpkgs-stable.overlaysBuilder = lib.overlay.create-overlays-builder {
inherit package-namespace;
};
systems.hosts.my-partner's-machine.channelName = "nixpkgs-stable";
However, while evaluating the configuration nix shouts:
error: attribute 'my' missing
It feels like the channels.nixpkgs-stable parameter is being completely ignored. That's quite strange, since the same block of code works for default nixpkgs:
https://github.com/snowfallorg/lib/blob/92803a029b5314d4436a8d9311d8707b71d9f0b6/snowfall-lib/flake/default.nix#L173-L176
And I don't see channels parameter removed in snowfall-lib.flake.without-snowfall-options or anywhere else... Strange!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the lib.mkFlake argument block in the issue and compare the channel-specific behavior with flake/default.nix lines 173-176, where the default nixpkgs overlay works. Then inspect snowfall-lib.flake.without-snowfall-options to trace whether channels.nixpkgs-stable.overlaysBuilder is preserved; done means the partner system can access the package namespace from nixpkgs-stable without the missing-attribute error.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100