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.

79 lines
1.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months 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. (getDev libbfd)
  24. (getDev libiberty)
  25. (getDev libtool)
  26. munge
  27. nano
  28. (getBin numactl)
  29. (getDev numactl)
  30. openmpi
  31. openssh
  32. pandoc
  33. (getDev papi)
  34. perl
  35. pkg-config
  36. postgresql
  37. (getDev postgresql)
  38. (getLib postgresql)
  39. python3
  40. ripgrep
  41. tmux
  42. (getBin ucx)
  43. (getDev ucx)
  44. valgrind
  45. vim
  46. wget
  47. (getDev zlib)
  48. (getBin scorep)
  49. (getBin scalasca)
  50. ];
  51. ignoreCollisions = false;
  52. inherit (config.environment) pathsToLink extraOutputsToInstall;
  53. };
  54. in
  55. {
  56. # environment.systemPackages = [ userenv ];
  57. environment.extraInit = ''
  58. if [[ "$(id -gn)" -eq "cluster" ]]; then
  59. export PKG_CONFIG_PATH="${makeSearchPath "lib/pkgconfig" config.environment.profiles}"
  60. fi
  61. '';
  62. environment.profiles = [
  63. "/etc/profiles/per-group/$(id -gn)"
  64. ];
  65. environment.etc."userenv" = {
  66. target = "profiles/per-group/cluster";
  67. source = userenv;
  68. };
  69. }