# Pastebin KIFWMfXn { nixpkgs ? }: with nixpkgs; let inherit (builtins) filter readDir; inherit (lib.attrSets) filterAttrs; dir = readDir ./.; in { dir = dir; # { ".git" = "directory"; "README.md" = "regular"; "default.nix" = "regular"; nixops = "directory"; nixos = "directory"; tools = "directory"; } dirType = builtins.typeOf dir; # "set" test = filterAttrs (n: t: t == "directory") dir; # error: value is a path while a set was expected }