refactor, ssh changes
This commit is contained in:
parent
3c6fc1476a
commit
bf05141776
7 changed files with 12 additions and 15 deletions
5
lib.nix
5
lib.nix
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, ... }:
|
||||
rec {
|
||||
# TODO make a version that only includes nix paths.
|
||||
walk-dir =
|
||||
path:
|
||||
let
|
||||
|
|
@ -15,4 +16,8 @@ rec {
|
|||
else
|
||||
builtins.throw "Items of type ${value} are unsupported.";
|
||||
}) dir;
|
||||
|
||||
# Takes a path `p` and returns a flattened lists of all files in that
|
||||
# directory, ignoring `p/default.nix`.
|
||||
import-recursive = path: lib.attrsets.collect builtins.isPath (walk-dir path // { default = { }; });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue