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
614 B

1 year ago
11 months ago
1 year ago
1 year ago
11 months ago
11 months ago
11 months ago
1 year ago
  1. { lib, config, nodeConfig, ... }:
  2. with lib;
  3. {
  4. networking.interfaces."enp2s0f0" = {
  5. ipv4.addresses = [{
  6. address = "10.32.47.${toString (100 + config.hpc.node.id)}";
  7. prefixLength = 24;
  8. }];
  9. };
  10. networking.defaultGateway = {
  11. address = "10.32.47.1";
  12. interface = "enp2s0f0";
  13. };
  14. hpc.dhcp.reservations = {
  15. "mngt" = {
  16. hwAddress = toLower nodeConfig.mngt;
  17. ipAddress = "10.32.46.${toString (100 + config.hpc.node.id)}";
  18. };
  19. "data" = {
  20. hwAddress = toLower nodeConfig.data;
  21. ipAddress = "10.32.47.${toString (100 + config.hpc.node.id)}";
  22. };
  23. };
  24. }