Automatically import nixos-modules to get the libS input, fix flake check

This commit is contained in:
Sandro - 2023-01-04 20:57:58 +01:00
parent 7145ac9fd3
commit bc89cc33c4
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -9,13 +9,15 @@
};
};
outputs = { nixpkgs-lib, ... }:
outputs = { nixos-modules, nixpkgs-lib, ... }:
let
inherit (nixpkgs-lib) lib;
ls = dir: lib.attrNames (builtins.readDir (./. + "/${dir}"));
in
{
nixosModule = _: {
nixosModule = { ... }: {
modules = [ nixos-modules.nixosModule ];
imports = (dir: map (file: ./. + "/${dir}/${file}") (ls dir)) "modules";
};
};