Refactor: Initial step

- Added library for common functions
- Moved machines/ to hosts/
- Automise adding new hosts to the flake
This commit is contained in:
caem 2024-07-25 21:24:28 +02:00
parent 95b9318585
commit 1ea937f884
Signed by: caem
GPG key ID: 69A830D03203405F
7 changed files with 54 additions and 5 deletions

10
lib/fs.nix Normal file
View file

@ -0,0 +1,10 @@
{ lib }:
{
getDirsInDir =
path: let
dirs = builtins.readDir path;
in
builtins.filter (name: dirs.${name} == "directory") (builtins.attrNames dirs);
}