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

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. { nixpkgs, disko, sops, gather, ... }@inputs:
  2. let
  3. deploymentPkgs = import nixpkgs {
  4. localSystem.system = "x86_64-linux";
  5. };
  6. nrNodes = 1;
  7. in
  8. with deploymentPkgs.lib; let
  9. mkMachine = type: opts: { lib, ... }:
  10. let
  11. machine = import ./machines/${type} opts;
  12. in
  13. {
  14. imports = [
  15. ./shared
  16. ./modules
  17. machine
  18. disko.nixosModules.disko
  19. sops.nixosModules.sops
  20. gather.nixosModules.gather
  21. ];
  22. };
  23. machines = {
  24. manager = mkMachine "manager" { };
  25. } // (listToAttrs (genList
  26. (i: nameValuePair
  27. "node-${fixedWidthNumber 2 i}"
  28. (mkMachine "node" { id = i; })
  29. )
  30. nrNodes));
  31. in
  32. {
  33. meta = {
  34. nixpkgs = deploymentPkgs;
  35. specialArgs = {
  36. inherit inputs;
  37. };
  38. };
  39. } // machines