mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
refactor pkgs/lib -> lib, kw.fw -> network.firewall, ...
This commit is contained in:
parent
ce5c5f7f7c
commit
0e126e2a2e
32 changed files with 35 additions and 35 deletions
5
lib/folder-list.nix
Normal file
5
lib/folder-list.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib }: path: excludes: let
|
||||
filterAttrNamesToList = filter: set:
|
||||
lib.foldl' (a: b: a ++ b) [ ]
|
||||
(map (e: if (filter e set.${e}) then [ e ] else [ ]) (lib.attrNames set));
|
||||
in (filterAttrNamesToList (name: type: ! (builtins.elem name excludes) && type == "directory") (builtins.readDir path))
|
||||
Loading…
Add table
Add a link
Reference in a new issue