On Mon, 02 Jul 2012 10:39:03 -0400, Eelco Dolstra <[email protected]> 
wrote:
> Hi,
> 
> On 02/07/12 10:09, Florian Friesdorf wrote:
> 
> > can somebody explain me what is going on here? Summary:
> > 
> > - garbage collect as user
> > - rerun garbage collect as user -> nothing to do
> > - sudo garbage collect -> more work to do including scary
> >   'invalidating' actions
> > 
> > Why is root garbage collecting more than user?
> 
> Because you're using sudo and sudo doesn't propagate the $NIX_CONF_DIR
> environment variable.  Because of this the Nix configuration file in
> /etc/nix/nix.conf won't be used.  By default it contains a line 
> "gc-keep-outputs
> = true" which prevents the outputs of derivations from being garbage 
> collected.
>  This explains that "sudo nix-collect-garbage" will suddenly garbage-collect
> tarballs like "xmonad-0.10.tar.gz".
> 
> Maybe we should add an "env_keep" line for $NIX_CONF_DIR to sudoers.

just pushed after testing it locally:

% nix-collect-garbage
cleaning

% sudo nix-collect-garbage
nothing to be done

% sudo -H nix-collect-garbage
nothing to be done

-- 
Florian Friesdorf <[email protected]>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: [email protected]
IRC: chaoflow on freenode,ircnet,blafasel,OFTC

Attachment: pgp9S7kXCB376.pgp
Description: PGP signature

_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to