refactor: simplify host setup

This commit is contained in:
Nickolaj Jepsen 2025-12-13 21:41:52 +01:00
parent 15fb616845
commit d1d4082d56
27 changed files with 147 additions and 90 deletions

View file

@ -1,11 +1,11 @@
{
config,
pkgs,
username,
hostname,
lib,
...
}: let
inherit (config.fireproof) username;
inherit (config.fireproof) hostname;
# Load all public keys from ../../secrets/hosts/*/id_ed25519.pub
allHosts = lib.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir ../../secrets/hosts));
publicKeys = map (x: builtins.readFile (../../secrets/hosts + ("/" + x) + "/id_ed25519.pub")) allHosts;