repo.or.cz
/
myNix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add swapfile for dot-vc2
[myNix.git]
/
lbhost
/
modules
/
default.nix
blob
1c71141158dc55d191066a2c74f0e80df8b5b845
1
{ lib
2
, ...
3
}:
4
5
let
6
inherit (builtins)
7
readDir
8
filter
9
toString
10
;
11
inherit (lib)
12
flatten
13
mapAttrsToList
14
hasSuffix
15
;
16
17
list-dir-rec = path:
18
let
19
dir = readDir path;
20
misc-list = mapAttrsToList
21
(name: type:
22
let file-path = path + "/${name}";
23
in if type == "directory" then list-dir-rec file-path
24
else file-path
25
)
26
dir;
27
list = flatten misc-list;
28
in
29
list;
30
31
32
imports = filter
33
(path:
34
(path != ./default.nix) && (hasSuffix ".nix" (toString path))
35
)
36
(list-dir-rec ./.);
37
in
38
{
39
inherit imports;
40
}