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.

32 lines
638 B

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