First Commit
This commit is contained in:
19
modules/cli/default.nix
Normal file
19
modules/cli/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
b = builtins;
|
||||
|
||||
module_files =
|
||||
b.readDir ./. |>
|
||||
lib.filterAttrs (name: type:
|
||||
( (lib.strings.hasSuffix ".nix" name
|
||||
&& name != "default.nix"
|
||||
&& type == "regular" )
|
||||
|| ( type == "directory"
|
||||
&& b.pathExists ./${name}/default.nix))
|
||||
) |>
|
||||
b.attrNames |>
|
||||
b.map (f: ./${f});
|
||||
in
|
||||
{
|
||||
imports = module_files;
|
||||
}
|
||||
Reference in New Issue
Block a user