NixOS configuration for HPC cluster https://docs.hpc.informatik.hs-fulda.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
498 B

  1. { lib, nodes, ... }:
  2. with lib;
  3. {
  4. programs.ssh = {
  5. # Add know-host entries for all machines in the cluster
  6. knownHosts = mapAttrs
  7. (name: node: {
  8. hostNames = [
  9. node.config.networking.hostName
  10. node.config.networking.fqdn
  11. ];
  12. publicKeyFile = node.config.gather.parts."ssh/hostKey".path;
  13. })
  14. nodes;
  15. };
  16. gather.parts."ssh/hostKey" = {
  17. name = "ssh_host_ed25519_key.pub";
  18. file = "/etc/ssh/ssh_host_ed25519_key.pub";
  19. };
  20. }