diff --git a/builtinModules/core.nix b/builtinModules/core.nix index 5b7fb23..6fc1453 100644 --- a/builtinModules/core.nix +++ b/builtinModules/core.nix @@ -2,13 +2,13 @@ # Copyright (C) 2023 Archit Gupta # SPDX-License-Identifier: MIT -{ config, inputs, lib, flakelight, ... }: +{ config, inputs, lib, flakelight, moduleArgs, ... }: let inherit (builtins) all head isAttrs length; inherit (lib) foldAttrs genAttrs getFiles getValues mapAttrs mergeAttrs mkOption mkOptionType showFiles showOption; inherit (lib.types) functionTo lazyAttrsOf listOf nonEmptyStr raw uniq; - inherit (flakelight.types) optListOf overlay; + inherit (flakelight.types) optCallWith optListOf overlay; outputs = mkOptionType { name = "outputs"; @@ -43,7 +43,7 @@ in }; outputs = mkOption { - type = lazyAttrsOf outputs; + type = optCallWith moduleArgs (lazyAttrsOf outputs); default = { }; }; diff --git a/builtinModules/functor.nix b/builtinModules/functor.nix index 79a4024..1697c9a 100644 --- a/builtinModules/functor.nix +++ b/builtinModules/functor.nix @@ -13,7 +13,7 @@ in default = null; }; - config.outputs = mkIf (config.functor != null) { + config.outputs = mkIf (config.functor != null) (_: { __functor = config.functor; - }; + }); } diff --git a/builtinModules/nixDir.nix b/builtinModules/nixDir.nix index cf02b2f..b78b7da 100644 --- a/builtinModules/nixDir.nix +++ b/builtinModules/nixDir.nix @@ -19,7 +19,7 @@ in config = let - outputs = autoImportArgs' "outputs"; + outputs = autoImport' "outputs"; perSystem = autoImport' "perSystem"; withOverlays = autoImport' "withOverlays"; package = autoImport' "package";