Fix module import

This commit is contained in:
Sandro - 2023-01-09 20:47:20 +01:00
parent b10523c86d
commit 68783a0583
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,9 @@
nixosModule = { config, libS, ... }@args: {
_module.args.libS = lib.mkOverride 1001 (nixos-modules.lib { inherit lib config; });
imports = (dir: map
imports = [
nixos-modules.nixosModules.default
] ++ (dir: map
(file: ./. + "/${dir}/${file}")
# assume that the nixos-modules repo is already imported if libS exists
(lib.remove (lib.optionalString (lib.hasAttr "libS" args) "default.nix") (ls dir))