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.

57 lines
1.1 KiB

1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
7 months ago
1 year ago
1 year ago
1 year ago
  1. { pkgs, lib, config, nodes, ... }:
  2. with lib;
  3. let
  4. nodeConfig = concatStringsSep " " (mapAttrsToList
  5. (key: value: "${key}=${toString value}")
  6. {
  7. CPUs = 64;
  8. Boards = 1;
  9. SocketsPerBoard = 4;
  10. CoresPerSocket = 16;
  11. ThreadsPerCore = 1;
  12. });
  13. in
  14. {
  15. services.slurm = {
  16. clusterName = "mogli";
  17. controlMachine = "manager";
  18. nodeName = map
  19. (node: "${node.config.networking.hostName} ${nodeConfig}")
  20. (filter
  21. (node: node.config.hpc.node.enable)
  22. (attrValues nodes));
  23. partitionName = [
  24. "all Nodes=ALL Default=YES MaxTime=6:00:00 State=UP"
  25. "vip Nodes=ALL AllowGroups=vip Default=NO MaxTime=INFINITE State=UP"
  26. ];
  27. extraConfig = ''
  28. MailProg=${pkgs.mailutils}/bin/mail
  29. '';
  30. };
  31. services.munge = {
  32. enable = true;
  33. password = config.sops.secrets."munge/password".path;
  34. };
  35. sops.secrets."munge/password" = {
  36. sopsFile = ./secrets.yaml;
  37. owner = "munge";
  38. };
  39. # Have a VIP group for users with unlimited queues
  40. users.groups."vip" = {
  41. members = [
  42. "fdai2856"
  43. "fdai0159"
  44. "fdai0231"
  45. ];
  46. };
  47. }