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.

101 lines
1.9 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
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. gather = {
  47. type = "github";
  48. owner = "fooker";
  49. repo = "gather.nix";
  50. };
  51. };
  52. outputs = { nixpkgs, utils, ... }@inputs: {
  53. colmena = import ./machines.nix inputs;
  54. devShell = utils.lib.eachSystemMap utils.lib.allSystems (system:
  55. let
  56. pkgs = nixpkgs.legacyPackages.${system};
  57. pre-commit-hooks = inputs.pre-commit-hooks.lib.${system}.run {
  58. src = ./.;
  59. hooks = {
  60. nixpkgs-fmt.enable = true;
  61. statix.enable = true;
  62. shellcheck.enable = true;
  63. };
  64. };
  65. in
  66. pkgs.mkShell {
  67. buildInputs = [
  68. inputs.colmena.defaultPackage.${system}
  69. ] ++ (with pkgs; [
  70. bash
  71. gitAndTools.git
  72. gnutar
  73. gzip
  74. nixUnstable
  75. openssh
  76. sops
  77. age
  78. ]);
  79. shellHook = ''
  80. ${pre-commit-hooks.shellHook}
  81. '';
  82. });
  83. };
  84. }