Individual channel configuration.
Adopted from https://github.com/snowfallorg/lib/pull/128#issuecomment-3383838494
This commit is contained in:
parent
f0e35a78e9
commit
73e5ee371b
2 changed files with 22 additions and 7 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
snowfall-lib,
|
snowfall-lib,
|
||||||
snowfall-config,
|
snowfall-config,
|
||||||
}: let
|
}: 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 {
|
in rec {
|
||||||
flake = rec {
|
flake = rec {
|
||||||
## Remove the `self` attribute from an attribute set.
|
## Remove the `self` attribute from an attribute set.
|
||||||
|
|
@ -128,6 +128,7 @@ in rec {
|
||||||
inherit namespace;
|
inherit namespace;
|
||||||
extra-overlays = full-flake-options.extra-exported-overlays or {};
|
extra-overlays = full-flake-options.extra-exported-overlays or {};
|
||||||
};
|
};
|
||||||
|
channels = full-flake-options.channels or {};
|
||||||
|
|
||||||
outputs-builder = channels: let
|
outputs-builder = channels: let
|
||||||
user-outputs-builder =
|
user-outputs-builder =
|
||||||
|
|
@ -172,12 +173,27 @@ in rec {
|
||||||
darwinModules = darwin-modules;
|
darwinModules = darwin-modules;
|
||||||
homeModules = home-modules;
|
homeModules = home-modules;
|
||||||
|
|
||||||
channelsConfig = full-flake-options.channels-config or {};
|
channelsConfig =
|
||||||
|
full-flake-options.channels-config
|
||||||
|
|
||||||
channels.nixpkgs.overlaysBuilder = snowfall-lib.overlay.create-overlays-builder {
|
|
||||||
inherit namespace;
|
or full-flake-options.channelsConfig
|
||||||
extra-overlays = full-flake-options.overlays or [];
|
|
||||||
};
|
|
||||||
|
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;
|
outputsBuilder = outputs-builder;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ in {
|
||||||
systems = args.systems or {};
|
systems = args.systems or {};
|
||||||
|
|
||||||
lib = snowfall-lib.internal.system-lib;
|
lib = snowfall-lib.internal.system-lib;
|
||||||
pkgs = user-inputs.self.pkgs.${system}.nixpkgs;
|
|
||||||
|
|
||||||
inputs = snowfall-lib.flake.without-src user-inputs;
|
inputs = snowfall-lib.flake.without-src user-inputs;
|
||||||
namespace = snowfall-config.namespace;
|
namespace = snowfall-config.namespace;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue