From c27dde13adf7120bb23c1ca77dbe840fe5d4ad39 Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Fri, 18 Nov 2022 05:48:21 +0300 Subject: [PATCH] fix: pass dream2nixInterface to modules aswell --- src/default.nix | 10 +++++----- src/lib.nix | 1 + src/modules/top-level.nix | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/default.nix b/src/default.nix index 5618cf75..b3bb115e 100644 --- a/src/default.nix +++ b/src/default.nix @@ -81,6 +81,11 @@ in let ; dream2nixConfigFile = configFile; dream2nixConfig = config; + dream2nixInterface = { + inherit + makeOutputsForDreamLock + ; + }; }; /* @@ -102,11 +107,6 @@ in let inherit framework; inherit dream2nixWithExternals; inherit nix; - dream2nixInterface = { - inherit - makeOutputsForDreamLock - ; - }; }; # like pkgs.callPackage, but includes all the dream2nix modules diff --git a/src/lib.nix b/src/lib.nix index c65ff99d..764c9b96 100644 --- a/src/lib.nix +++ b/src/lib.nix @@ -103,6 +103,7 @@ pkgs = throw "pkgs is not available before nixpkgs is imported"; externals = throw "externals is not available before nixpkgs is imported"; dream2nixWithExternals = throw "not available before nixpkgs is imported"; + dream2nixInterface = throw "not available before nixpkgs is imported"; }; initD2N = initDream2nix config; diff --git a/src/modules/top-level.nix b/src/modules/top-level.nix index 315c31a0..19ff1ca8 100644 --- a/src/modules/top-level.nix +++ b/src/modules/top-level.nix @@ -8,6 +8,7 @@ dream2nixConfig, dream2nixConfigFile, dream2nixWithExternals, + dream2nixInterface, } @ args: let t = lib.types; in { @@ -61,6 +62,9 @@ in { dream2nixConfigFile = lib.mkOption { type = t.path; }; + dream2nixInterface = lib.mkOption { + type = t.raw; + }; }; config = args