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.

37 lines
689 B

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