From a21607f907feccfcc2709ef484ecac9fddb488f1 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 21 Jul 2024 16:23:50 +0800 Subject: [PATCH] wrapper-manager-fds/lib: update module evaluation function Now we set `pkgs` modularly allowing users to set their own nixpkgs instance for whatever reason. Also, we removed `modulesPath` since it is pointless and I would like to keep wrapper-manager-fds to be pretty simple to maintain at its core. --- subprojects/wrapper-manager-fds/lib/env.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/subprojects/wrapper-manager-fds/lib/env.nix b/subprojects/wrapper-manager-fds/lib/env.nix index bb15ce57..74242e4b 100644 --- a/subprojects/wrapper-manager-fds/lib/env.nix +++ b/subprojects/wrapper-manager-fds/lib/env.nix @@ -13,10 +13,16 @@ rec { specialArgs ? { }, }: lib.evalModules { - modules = [ ../modules/wrapper-manager ] ++ modules; - specialArgs = specialArgs // { - inherit pkgs; - modulesPath = builtins.toString ../modules/wrapper-manager; - }; + inherit specialArgs; + modules = [ + ../modules/wrapper-manager + + # Setting pkgs modularly. This would make setting up wrapper-manager + # with different nixpkgs instances possible but it isn't something that + # is explicitly supported. + ({ lib, ... }: { + config._module.args.pkgs = lib.mkDefault pkgs; + }) + ] ++ modules; }; }