Refactor: Initial step
- Added library for common functions - Moved machines/ to hosts/ - Automise adding new hosts to the flake
This commit is contained in:
parent
95b9318585
commit
1ea937f884
7 changed files with 54 additions and 5 deletions
10
lib/fs.nix
Normal file
10
lib/fs.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ lib }:
|
||||
|
||||
{
|
||||
getDirsInDir =
|
||||
path: let
|
||||
dirs = builtins.readDir path;
|
||||
in
|
||||
builtins.filter (name: dirs.${name} == "directory") (builtins.attrNames dirs);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue