dot.nix/lib/default.nix
tophC7 2f83f84270 Add secret spec & update host config
- Import secrets modules into main configuration
- Rename and rearrange host specification options
- Introduce new host options: desktop, shell, and pool
- Create secret spec with SSH, API, Docker, user, and firewall submodules
2025-04-22 21:07:07 -04:00

21 lines
637 B
Nix

# 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)
)
);
}