# This is the environment that we show for the users. # Hear me out... I already regrett doing this while writing this, but (l)users # are not willing to pick up the nix-struggle for the greater benefit. So, here # I am building this shit that I know will fall apart soon. { pkgs, lib, config, ... }: with lib; let userenv = pkgs.buildEnv { name = "userenv"; paths = with pkgs; [ autoconf automake bash coreutils curl fd flex gcc gdb git gnumake hwloc (getDev libbfd) (getDev libiberty) (getDev libtool) munge nano (getBin numactl) (getDev numactl) openmpi openssh pandoc (getDev papi) perl pkg-config postgresql (getDev postgresql) (getLib postgresql) python3 ripgrep tmux (getBin ucx) (getDev ucx) valgrind vim wget (getDev zlib) (getBin scorep) (getBin scalasca) ]; ignoreCollisions = false; inherit (config.environment) pathsToLink extraOutputsToInstall; }; in { # environment.systemPackages = [ userenv ]; environment.extraInit = '' if [[ "$(id -gn)" -eq "cluster" ]]; then export PKG_CONFIG_PATH="${makeSearchPath "lib/pkgconfig" config.environment.profiles}" fi ''; environment.profiles = [ "/etc/profiles/per-group/$(id -gn)" ]; environment.etc."userenv" = { target = "profiles/per-group/cluster"; source = userenv; }; }