Something went wrong. Try again.
A Minecraft datapack generator written in go.
Something went wrong. Try again.
12345678910111213141516171819202122232425# This files import all modules inside this folder and the subfolders but# ignore all files and directories starting with a `_`.{ lib, ... }:let importDir = dir: let entries = builtins.readDir dir; nixFiles = lib.filterAttrs (name: type: type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix" && !(lib.hasPrefix "_" name) ) entries; subdirs = lib.filterAttrs (name: type: type == "directory" && !(lib.hasPrefix "_" name) ) entries; in (map (name: dir + "/${name}") (lib.attrNames nixFiles)) ++ (lib.concatMap (name: importDir (dir + "/${name}")) (lib.attrNames subdirs));in{ imports = importDir ./.;}