diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-25 00:48:28 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-25 00:48:28 +0200 |
commit | f70fbb179128e795fcc6d07c52454c1dbcaa196a (patch) | |
tree | 8d1222270d9d6c88755eb8c6b50afdcb0ae8733d | |
parent | cfd20debfb0bdd21d9695278350ca8ed4b2d76d0 (diff) | |
download | nixlib-f70fbb179128e795fcc6d07c52454c1dbcaa196a.tar nixlib-f70fbb179128e795fcc6d07c52454c1dbcaa196a.tar.gz nixlib-f70fbb179128e795fcc6d07c52454c1dbcaa196a.tar.bz2 nixlib-f70fbb179128e795fcc6d07c52454c1dbcaa196a.tar.lz nixlib-f70fbb179128e795fcc6d07c52454c1dbcaa196a.tar.xz nixlib-f70fbb179128e795fcc6d07c52454c1dbcaa196a.tar.zst nixlib-f70fbb179128e795fcc6d07c52454c1dbcaa196a.zip |
Fix duplicated environment values
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.
-rw-r--r-- | modules/config/shells-environment.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/config/shells-environment.nix b/modules/config/shells-environment.nix index f1ce492d8165..4f7447f435bc 100644 --- a/modules/config/shells-environment.nix +++ b/modules/config/shells-environment.nix @@ -154,7 +154,7 @@ in ${concatStringsSep "\n" ( (mapAttrsToList (n: v: ''export ${n}="${concatStringsSep ":" v}"'') # This line is a kind of a hack because of !!! note above - (fold (mergeAttrsWithFunc concat) {} ([ (mapAttrs (n: v: [ v ]) cfg.variables) ] ++ map cfg.profileVariables cfg.profiles))))} + (zipAttrsWith (const concatLists) ([ (mapAttrs (n: v: [ v ]) cfg.variables) ] ++ map cfg.profileVariables cfg.profiles))))} ${cfg.extraInit} |