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.
This commit is contained in:
Gabriel Arazas 2024-07-21 16:23:50 +08:00
parent 2a84b7e129
commit a21607f907
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -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;
};
}