mirror of
https://github.com/mjallen18/snowfall-lib.git
synced 2026-04-18 00:55:58 -05:00
feat: enable per-channel configuration and fix pkgs selection
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
snowfall-lib,
|
||||
snowfall-config,
|
||||
}: let
|
||||
inherit (core-inputs.nixpkgs.lib) assertMsg foldl filterAttrs const mapAttrs mapAttrs' hasSuffix removeSuffix nameValuePair;
|
||||
inherit (core-inputs.nixpkgs.lib) assertMsg foldl filterAttrs const mapAttrs mapAttrs' hasSuffix removeSuffix nameValuePair traceVal;
|
||||
in rec {
|
||||
flake = rec {
|
||||
## Remove the `self` attribute from an attribute set.
|
||||
@@ -128,6 +128,7 @@ in rec {
|
||||
inherit namespace;
|
||||
extra-overlays = full-flake-options.extra-exported-overlays or {};
|
||||
};
|
||||
channels = full-flake-options.channels or {};
|
||||
|
||||
outputs-builder = channels: let
|
||||
user-outputs-builder =
|
||||
@@ -172,12 +173,22 @@ in rec {
|
||||
darwinModules = darwin-modules;
|
||||
homeModules = home-modules;
|
||||
|
||||
channelsConfig = full-flake-options.channels-config or {};
|
||||
channelsConfig =
|
||||
full-flake-options.channels-config
|
||||
or full-flake-options.channelsConfig
|
||||
or {};
|
||||
|
||||
channels.nixpkgs.overlaysBuilder = snowfall-lib.overlay.create-overlays-builder {
|
||||
inherit namespace;
|
||||
extra-overlays = full-flake-options.overlays or [];
|
||||
};
|
||||
channels =
|
||||
mapAttrs
|
||||
(channel: config:
|
||||
config
|
||||
// {
|
||||
overlaysBuilder = snowfall-lib.overlay.create-overlays-builder {
|
||||
inherit namespace;
|
||||
extra-overlays = full-flake-options.overlays or [];
|
||||
};
|
||||
})
|
||||
({nixpkgs = {};} // channels);
|
||||
|
||||
outputsBuilder = outputs-builder;
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ in {
|
||||
systems = args.systems or {};
|
||||
|
||||
lib = snowfall-lib.internal.system-lib;
|
||||
pkgs = user-inputs.self.pkgs.${system}.nixpkgs;
|
||||
|
||||
inputs = snowfall-lib.flake.without-src user-inputs;
|
||||
namespace = snowfall-config.namespace;
|
||||
|
||||
Reference in New Issue
Block a user