Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dashboardJsonFiles =
- let
- dir = "${../../../dashboards}";
- dirEntries = builtins.readDir dir;
- jsonFiles = lib.filterAttrs
- (path: type: type == "regular" && lib.hasSuffix ".json" path)
- dirEntries;
- rawAttrs = map
- (name: {
- name = "grafana/dashboards/${name}";
- value = {
- source = builtins.toFile name (builtins.readFile "${dir}/${name}");
- };
- })
- (builtins.attrNames jsonFiles);
- in
- builtins.listToAttrs rawAttrs;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement