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.
48 lines
795 B
48 lines
795 B
{ nixpkgs, disko, sops, gather, ... }@inputs:
|
|
|
|
let
|
|
deploymentPkgs = import nixpkgs {
|
|
localSystem.system = "x86_64-linux";
|
|
};
|
|
|
|
nrNodes = 1;
|
|
|
|
in
|
|
with deploymentPkgs.lib; let
|
|
|
|
mkMachine = type: opts: { lib, ... }:
|
|
let
|
|
machine = import ./machines/${type} opts;
|
|
in
|
|
{
|
|
imports = [
|
|
./shared
|
|
./modules
|
|
|
|
machine
|
|
|
|
disko.nixosModules.disko
|
|
sops.nixosModules.sops
|
|
gather.nixosModules.gather
|
|
];
|
|
};
|
|
|
|
machines = {
|
|
manager = mkMachine "manager" { };
|
|
} // (listToAttrs (genList
|
|
(i: nameValuePair
|
|
"node-${fixedWidthNumber 2 i}"
|
|
(mkMachine "node" { id = i; })
|
|
)
|
|
nrNodes));
|
|
|
|
in
|
|
{
|
|
meta = {
|
|
nixpkgs = deploymentPkgs;
|
|
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
};
|
|
} // machines
|