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.

45 lines
770 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. in
  7. with deploymentPkgs.lib; let
  8. mkMachine = type: opts: { lib, ... }:
  9. let
  10. machine = import ./machines/${type} opts;
  11. in
  12. {
  13. imports = [
  14. ./shared
  15. ./modules
  16. machine
  17. disko.nixosModules.disko
  18. sops.nixosModules.sops
  19. gather.nixosModules.gather
  20. ];
  21. };
  22. machines = {
  23. manager = mkMachine "manager" { };
  24. } // (listToAttrs (genList
  25. (i: nameValuePair
  26. "node-${fixedWidthNumber 2 i}"
  27. (mkMachine "node" { id = i; })
  28. ) 16));
  29. in
  30. {
  31. meta = {
  32. nixpkgs = deploymentPkgs;
  33. specialArgs = {
  34. inherit inputs;
  35. };
  36. };
  37. } // machines