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

{ lib, config, ... }:
with lib;
let
node = (import ../nodes.nix).${config.hpc.node.name};
in
{
networking.interfaces."enp2s0f0" = {
ipv4.addresses = [{
address = "10.32.47.${toString (100 + config.hpc.node.id)}";
prefixLength = 24;
}];
};
networking.defaultGateway = {
address = "10.32.47.1";
interface = "enp2s0f0";
};
hpc.dhcp.reservations = {
"mngt" = {
hwAddress = node.mngt;
ipAddress = "10.32.46.${toString (100 + config.hpc.node.id)}";
};
"data" = {
hwAddress = node.data;
ipAddress = "10.32.47.${toString (100 + config.hpc.node.id)}";
};
};
}