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.

95 lines
1.9 KiB

1 year ago
  1. {
  2. inputs = {
  3. nixpkgs = {
  4. type = "github";
  5. owner = "NixOS";
  6. repo = "nixpkgs";
  7. ref = "nixos-22.11";
  8. };
  9. colmena = {
  10. type = "github";
  11. owner = "zhaofengli";
  12. repo = "colmena";
  13. inputs.nixpkgs.follows = "nixpkgs";
  14. };
  15. nixago = {
  16. type = "github";
  17. owner = "nix-community";
  18. repo = "nixago";
  19. inputs.nixpkgs.follows = "nixpkgs";
  20. inputs.flake-utils.follows = "utils";
  21. };
  22. pre-commit-hooks = {
  23. type = "github";
  24. owner = "cachix";
  25. repo = "pre-commit-hooks.nix";
  26. inputs.nixpkgs.follows = "nixpkgs";
  27. };
  28. sops = {
  29. type = "github";
  30. owner = "Mic92";
  31. repo = "sops-nix";
  32. inputs.nixpkgs.follows = "nixpkgs";
  33. inputs.nixpkgs-stable.follows = "nixpkgs";
  34. };
  35. utils = {
  36. type = "github";
  37. owner = "numtide";
  38. repo = "flake-utils";
  39. };
  40. disko = {
  41. type = "github";
  42. owner = "nix-community";
  43. repo = "disko";
  44. inputs.nixpkgs.follows = "nixpkgs";
  45. };
  46. };
  47. outputs = { nixpkgs, utils, ... }@inputs: {
  48. colmena = import ./machines.nix inputs;
  49. devShell = utils.lib.eachSystemMap utils.lib.allSystems (system:
  50. let
  51. pkgs = nixpkgs.legacyPackages.${system};
  52. pre-commit-hooks = inputs.pre-commit-hooks.lib.${system}.run {
  53. src = ./.;
  54. hooks = {
  55. nixpkgs-fmt.enable = true;
  56. statix.enable = true;
  57. shellcheck.enable = true;
  58. };
  59. };
  60. in
  61. pkgs.mkShell {
  62. buildInputs = [
  63. inputs.colmena.defaultPackage.${system}
  64. ] ++ (with pkgs; [
  65. bash
  66. gitAndTools.git
  67. gnutar
  68. gzip
  69. nixUnstable
  70. openssh
  71. sops
  72. age
  73. ]);
  74. shellHook = ''
  75. ${pre-commit-hooks.shellHook}
  76. '';
  77. });
  78. };
  79. }