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.

28 lines
597 B

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