mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
work
This commit is contained in:
parent
2091fb1fdc
commit
79e25fcdc8
5 changed files with 142 additions and 2 deletions
18
lib/default.nix
Normal file
18
lib/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# FIXME(lib.custom): Add some stuff from hmajid2301/dotfiles/lib/module/default.nix, as simplifies option declaration
|
||||
{lib, ...}: {
|
||||
# use path relative to the root of the project
|
||||
relativeToRoot = lib.path.append ../.;
|
||||
scanPaths = path:
|
||||
builtins.map (f: (path + "/${f}")) (
|
||||
builtins.attrNames (
|
||||
lib.attrsets.filterAttrs (
|
||||
path: _type:
|
||||
(_type == "directory") # include directories
|
||||
|| (
|
||||
(path != "default.nix") # ignore default.nix
|
||||
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
||||
)
|
||||
) (builtins.readDir path)
|
||||
)
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue