[Nix-dev] [Nix-commits] SVN commit: nix - r30127 - in nixos/trunk/modules: config installer/cd-dvd installer/generations-dir installer/tools installer/tools/nixos-deploy-network misc security services/misc services/monito...
Eelco Dolstra
e.dolstra at tudelft.nl
Sun Oct 30 23:49:31 CET 2011
Hi,
On 10/30/2011 04:19 PM, Peter Simons wrote:
> Reverting revisions 30103-30106: "always set nixpkgs.config.{state,store}Dir", etc.
>
> After the change from revision 30103, nixos-rebuild suddenly consumed
> freaky amounts of memory. I had to abort the process after it had
> allocated well in excess of 30GB(!) of RAM. I'm not sure what is causing
> this behavior, but undoing that assignment fixes the problem. The other
> two commits needed to be revoked, too, because they depend on 30103.
I'm pretty sure that the cause of this is this line:
> - config.nixpkgs.config.nix = { storeDir = /nix/store; stateDir = /nix/var; };
This should be:
config.nixpkgs.config.nix =
{ storeDir = "/nix/store"; stateDir = "/nix/var";};
Note the quotes. Otherwise, the entire /nix/store and /nix/var will be read as
a dependency of the generated config files that refer to it.
On the other hand, is it really necessary to make this configurable? Clearly
people may want to use Nix with non-standard prefixes, but in NixOS we should be
able to assume that we can use /nix/store and /nix/var.
Also, without automated tests, this feature will inevitably suffer from bitrot.
(People will make future changes that assume /nix/store and /nix/var.)
--
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
More information about the nix-dev
mailing list