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.
46 lines
774 B
46 lines
774 B
{ id, ... }:
|
|
{ lib, config, nodes, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
nodeName = "node-${fixedWidthNumber 2 id}";
|
|
|
|
in
|
|
{
|
|
imports = [
|
|
./hardware.nix
|
|
./disk.nix
|
|
./network.nix
|
|
./users.nix
|
|
./slurm.nix
|
|
(import ../nodes.nix).${nodeName}
|
|
];
|
|
|
|
deployment = {
|
|
targetHost = "10.32.47.${fixedWidthNumber 3 (100 + id)}";
|
|
targetUser = "root";
|
|
|
|
tags = [ "node" ];
|
|
};
|
|
|
|
_module.args = {
|
|
nodeId = id;
|
|
inherit nodeName;
|
|
};
|
|
|
|
networking.hostName = nodeName;
|
|
|
|
networking.timeServers = [
|
|
"manager.${config.networking.domain}"
|
|
];
|
|
|
|
nix.settings = {
|
|
substituters = [
|
|
"http://cache.${config.networking.domain}"
|
|
];
|
|
trusted-public-keys = [
|
|
(fileContents nodes."manager".config.gather.parts."cache/key".path)
|
|
];
|
|
};
|
|
}
|