Hosts, Use directory-driven hosts in flake.nix

This adds some code to flake.nix to read the directory of hosts/ and
find all hosts based on their host.nix file, and set the hostname based
on the directory.

I don't know enough about hostnames to know what are valid characters,
but in the future this could allow a hostname such as "servers/madoka"
which may be an issue. For now the structure is simple enough of
"hosts/name" resulting in hostname "name"

Another commit is planned which will do the same thing for users
This commit is contained in:
Julia Lange 2024-11-14 13:55:47 -08:00
parent 86bc28d6d4
commit ba5fd48569
Signed by: Julia
SSH key fingerprint: SHA256:KI8YxpkPRbnDRkXPgCuQCVz181++Vy7NAvmQj8alOhM
3 changed files with 15 additions and 5 deletions