# 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 libbfd libiberty libtool munge nano numactl openmpi openssh pandoc papi perl pkg-config postgresql postgresql.lib python3 ripgrep tmux ucx valgrind vim wget zlib ]; 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; }; }