14 lines
306 B
Nix
14 lines
306 B
Nix
{ lib }:
|
|
|
|
{
|
|
dirNames =
|
|
path: builtins.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir path));
|
|
|
|
hostMeta =
|
|
hostDir:
|
|
if builtins.pathExists (hostDir + "/meta.nix") then
|
|
import (hostDir + "/meta.nix")
|
|
else
|
|
throw "meta.nix required in ${hostDir}";
|
|
}
|