feat: Pass through individual channel configuration #128
+18
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While looking for a way to achieve per host nixpkgs configurations within snowfall a while ago (see #106), I found out it (very understandably) wasn't a supported use case. I've since familiarized myself some more with both nix and snowfall, so I figured I'd try and give solving that issue cleanly a shot. Hopefully the solution I came up with makes sense!
Essentially, channel-specific configuration is now passed through to flake-utils-plus.mkFlake, allowing channels to have distinct settings and making so individual hosts can have their channel changed. Additionally, the same overlays that were once applied only to the default nixpkgs channel are now also applied to any other user-specified channels automatically.
As a demonstration, the following is a minimal working snippet from my personal flake showcasing how I manage to enable cuda support for my one host with a NVIDIA GPU without affecting the other hosts.