From 25caf736d5c16fa0c026c26ff4e7b7779fcbb7ae Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 4 Jan 2022 22:00:00 +0100 Subject: [PATCH] nixos/eval-config: Layer on top of nixos/eval-config-minimal --- nixos/lib/eval-config-minimal.nix | 4 ++-- nixos/lib/eval-config.nix | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/lib/eval-config-minimal.nix b/nixos/lib/eval-config-minimal.nix index 6479b7144907..a0fcf2389779 100644 --- a/nixos/lib/eval-config-minimal.nix +++ b/nixos/lib/eval-config-minimal.nix @@ -4,7 +4,7 @@ let inherit (nonExtendedLib) warn; nonExtendedLib = import ../../lib; in -{ lib ? nonExtendedLib, ... }: +{ lib ? nonExtendedLib, bypassEvalModulesWarning ? false, ... }: let /* @@ -43,5 +43,5 @@ let in { - evalModules = builtins.seq experimentalWarning evalModules; + evalModules = builtins.seq (if bypassEvalModulesWarning then null else experimentalWarning) evalModules; } diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 62d09b8173bd..8ea82b30f16d 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -33,6 +33,8 @@ let pkgs_ = pkgs; in let + evalModulesMinimal = (import ./eval-config-minimal.nix { inherit lib; bypassEvalModulesWarning = true; }).evalModules; + pkgsModule = rec { _file = ./eval-config.nix; key = _file; @@ -70,11 +72,9 @@ let }; allUserModules = modules ++ legacyModules; - noUserModules = lib.evalModules ({ - inherit prefix; + noUserModules = evalModulesMinimal ({ + inherit prefix specialArgs; modules = baseModules ++ extraModules ++ [ pkgsModule modulesModule ]; - specialArgs = - { modulesPath = builtins.toString ../modules; } // specialArgs; }); # Extra arguments that are useful for constructing a similar configuration.