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.

33 lines
460 B

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. { lib, ... }:
  2. with lib;
  3. let
  4. nrNodes = 7;
  5. mkMachine = { name, type, opts ? { } }: rec {
  6. inherit name type opts;
  7. path = ./machines/${type};
  8. gather = ./gathered/${name};
  9. };
  10. manager = mkMachine {
  11. name = "manager";
  12. type = "manager";
  13. };
  14. nodes = genList
  15. (i: mkMachine {
  16. name = "node-${fixedWidthNumber 2 i}";
  17. type = "node";
  18. opts = { id = i; };
  19. })
  20. nrNodes;
  21. in
  22. concatLists [
  23. [ manager ]
  24. nodes
  25. ]