fix: user flake lib export should be user-lib only

This commit is contained in:
Jake Hamilton 2022-09-07 21:01:24 -07:00
parent 7e8aabfaff
commit aac9e0f375
No known key found for this signature in database
GPG key ID: 9762169A1B35EA68
2 changed files with 12 additions and 12 deletions

View file

@ -69,29 +69,29 @@ rec {
mkFlake = full-flake-options: mkFlake = full-flake-options:
let let
custom-flake-options = flake.without-snowfall-options full-flake-options; custom-flake-options = flake.without-snowfall-options full-flake-options;
systems = snowfall-lib.system.create-systems (full-flake-options.systems or {}); systems = snowfall-lib.system.create-systems (full-flake-options.systems or { });
hosts = snowfall-lib.attrs.merge-shallow [ (full-flake-options.systems.hosts or {}) systems ]; hosts = snowfall-lib.attrs.merge-shallow [ (full-flake-options.systems.hosts or { }) systems ];
templates = snowfall-lib.template.create-templates { templates = snowfall-lib.template.create-templates {
overrides = (full-flake-options.templates or {}); overrides = (full-flake-options.templates or { });
}; };
modules = snowfall-lib.module.create-modules { modules = snowfall-lib.module.create-modules {
overrides = (full-flake-options.modules or {}); overrides = (full-flake-options.modules or { });
}; };
outputs-builder = channels: outputs-builder = channels:
let let
user-outputs-builder = user-outputs-builder =
full-flake-options.outputs-builder full-flake-options.outputs-builder
or full-flake-options.outputsBuilder or full-flake-options.outputsBuilder
or (const {}); or (const { });
user-outputs = user-outputs-builder channels; user-outputs = user-outputs-builder channels;
packages = snowfall-lib.package.create-packages { packages = snowfall-lib.package.create-packages {
inherit channels; inherit channels;
overrides = (full-flake-options.packages or {}) // (user-outputs.packages or {}); overrides = (full-flake-options.packages or { }) // (user-outputs.packages or { });
}; };
shells = snowfall-lib.shell.create-shells { shells = snowfall-lib.shell.create-shells {
inherit channels; inherit channels;
overrides = (full-flake-options.shells or {}) // (user-outputs.devShells or {}); overrides = (full-flake-options.shells or { }) // (user-outputs.devShells or { });
}; };
outputs = { outputs = {
@ -106,12 +106,12 @@ rec {
inherit hosts templates; inherit hosts templates;
inherit (user-inputs) self; inherit (user-inputs) self;
lib = snowfall-lib.internal.system-lib; lib = snowfall-lib.internal.user-lib;
inputs = snowfall-lib.flake.without-src user-inputs; inputs = snowfall-lib.flake.without-src user-inputs;
nixosModules = modules; nixosModules = modules;
channelsConfig = full-flake-options.channels-config or {}; channelsConfig = full-flake-options.channels-config or { };
overlays = core-inputs.flake-utils-plus.lib.exportOverlays ({ overlays = core-inputs.flake-utils-plus.lib.exportOverlays ({
inherit (user-inputs.self) pkgs; inherit (user-inputs.self) pkgs;
@ -120,7 +120,7 @@ rec {
channels.nixpkgs.overlaysBuilder = snowfall-lib.overlay.create-overlays { channels.nixpkgs.overlaysBuilder = snowfall-lib.overlay.create-overlays {
overlay-package-namespace = full-flake-options.overlay-package-namespace or null; overlay-package-namespace = full-flake-options.overlay-package-namespace or null;
extra-overlays = full-flake-options.overlays or []; extra-overlays = full-flake-options.overlays or [ ];
}; };
outputsBuilder = outputs-builder; outputsBuilder = outputs-builder;

View file

@ -43,6 +43,6 @@ let
in in
{ {
internal = { internal = {
inherit system-lib; inherit system-lib user-lib;
}; };
} }