{ lib, ... }:
let
  inherit (lib) foldl' attrValues;
  take = machines: map (m: systems.${m}) machines;

  users = {
    ny = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMvPqWPXEUOSMGMIRmirQfbrzq//NkPlEI2TmFpIkSfw";
  };
  systems = {
    brontes = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICgknH3OPazZNhH5xkYfXBcYpI3TXj/eRp0/zzjtVJBf";
    marr = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAr1vzx7AAfyOrdIHUvYIN9LRL0x1M6pGkDXszy67l6n";
    raptus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKdpjGR/pV1roktZdKIVVWqds0JB+x1ksfyQmYPMLK7o";
    shan = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPnASO1+h9tUYsNrsePcmxFLpKBkyCXbcZB9W7f5Yt5U";
    nihilus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID7BfsJK6fmtoigWlfCliSWwonePOtfTVNTUJuyMiNi4";
  };

  workstations = take "brontes" "marr";
  server = take "raptus" "shan" "nihilus";

  all = foldl' (a: b: a ++ [ b ]) [ users.ny ] (attrValues systems);
in
{
  inherit all workstations server;
  inherit (users) ny;
  inherit (systems)
    raptus
    brontes
    marr
    shan
    nihilus
    ;
}
