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.

73 lines
1.3 KiB

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 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. # This is the environment that we show for the users.
  2. # Hear me out... I already regrett doing this while writing this, but (l)users
  3. # are not willing to pick up the nix-struggle for the greater benefit. So, here
  4. # I am building this shit that I know will fall apart soon.
  5. { pkgs, lib, config, ... }:
  6. with lib;
  7. let
  8. userenv = pkgs.buildEnv {
  9. name = "userenv";
  10. paths = with pkgs; [
  11. autoconf
  12. automake
  13. bash
  14. coreutils
  15. curl
  16. fd
  17. flex
  18. gcc
  19. gdb
  20. git
  21. gnumake
  22. hwloc
  23. libbfd
  24. libiberty
  25. libtool
  26. munge
  27. nano
  28. numactl
  29. openmpi
  30. openssh
  31. pandoc
  32. papi
  33. perl
  34. pkgconfig
  35. postgresql
  36. postgresql.lib
  37. python3
  38. ripgrep
  39. tmux
  40. ucx
  41. valgrind
  42. vim
  43. wget
  44. zlib
  45. ];
  46. ignoreCollisions = false;
  47. inherit (config.environment) pathsToLink extraOutputsToInstall;
  48. };
  49. in
  50. {
  51. # environment.systemPackages = [ userenv ];
  52. environment.extraInit = ''
  53. if [[ "$(id -gn)" -eq "cluster" ]]; then
  54. export PKG_CONFIG_PATH="${makeSearchPath "lib/pkgconfig" config.environment.profiles}"
  55. fi
  56. '';
  57. environment.profiles = [
  58. "/etc/profiles/per-group/$(id -gn)"
  59. ];
  60. environment.etc."userenv" = {
  61. target = "profiles/per-group/cluster";
  62. source = userenv;
  63. };
  64. }