[Nix-dev] cleaning /tmp

Florian Friesdorf flo at chaoflow.net
Mon Jan 30 12:54:46 CET 2012


On Sun, 29 Jan 2012 21:28:38 +0100, Mathijs Kwik <mathijs at bluescreen303.nl> wrote:
> Hi all,
> 
> After a reboot, I found that my /tmp is taking up 8Gb of space.
> I don't want to use a tmpfs for it, as I occasionally use audio/video
> tools that write to /tmp, with sizes above my system memory.
> 
> Looking at FHS's recommendations, I would say there are 2 moments to clean /tmp.
> - At boot time (almost) everything can be deleted.
> - For systems that don't reboot often (servers, laptops that just
> suspend instead of shut down), a daily cron job can delete items older
> than (2 weeks / a month).
> 
> Does nixos have anything in place to manage /tmp?
> What do others do?

I would welcome a config option for that:
services.cleanTmp.enable = true;
services.cleanTmp.paths = [ '/tmp' '/var/tmp' ] (default)
services.cleanTmp.onBoot = true;
services.cleanTmp.interval = XYZ;

Do we have something to specify XYZ?

-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120130/9c75f879/attachment.bin 


More information about the nix-dev mailing list