Commit graph

7 commits

Author SHA1 Message Date
Eelco Dolstra 5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
Eelco Dolstra f70fbb1791 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.
2013-09-25 00:48:28 +02:00
Shea Levy 9ce148e738 Don't break compatibility with pre-1.6 nix
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-24 09:40:06 -04:00
Eelco Dolstra ec2266b2e2 Make environment variables overridable 2013-09-24 11:27:25 +02:00
Eelco Dolstra b933b15d72 Don't generate /etc/environment
/etc/environment, if it exists, should be a list of NAME=VALUE pairs,
not a shell script.  See the pam_env manpage.
2013-09-24 11:01:55 +02:00
Eelco Dolstra 9df40867b9 In environment.variables, unify "value" and "list" 2013-09-23 23:07:32 +02:00
Jan Malakhovski b3f4040512 Radically change the way NixOS handles environment variables and make it possible not to use Bash as the default interactive shell.
This change does two things:

* "NixOSizes" environment variables generation. This allows some more
  error-checking and opens possibilities for a modular environment
  configuration. From now on the most of environment variables are
  generated directly by the nix code. Generating sh code that
  generates environment variables is left in a few places where
  nontrivial access to a local environment state is needed.
* By doing the first change this patch untangles bash from the
  environment configuration and makes it trivial to add a support for
  other non bash-compatible shells.

Now to the sad part. This change is quite large (and I'm not sure it's
possible to split it) and yet is not quite complete, it needs some
changes to nixpkgs to be perfect.
See !!! comments in modules/config/shells-environment.nix.

Main principle behind this change is "change environment generation
and nothing else". In particular, shell configuration principles stay
exactly the same as before.
2013-09-23 16:55:25 +00:00