All profileVariables listed each profile twice (e.g. $PATH contained
$HOME/.nix-profile/bin twice). This is because mergeAttrsWithFunc is
broken (and deprecated):
nix-repl> :p mergeAttrsWithFunc concat { x = [1]; } { y = [2]; }
{ x = [ 1 ]; y = [ 2 2 ]; }
So use zipAttrsWith instead.