[Nix-dev] systemd tmpfiles service

Rickard Nilsson rickard.nilsson at telia.com
Tue Sep 17 12:36:43 CEST 2013


On 09/17/2013 11:48 AM, Eelco Dolstra wrote:
> Hi,
>
> On 16/09/13 18:14, Rickard Nilsson wrote:
>
>> Has anyone been thinking of implementing the systemd tmpfiles service
>> (http://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html)
>> in NixOS? It seems useful for non-root services that need directories in
>> /run/ before they are started. Would be nice to let systemd take care of
>> the file creation instead of doing mkdir in preStart etc.
>
> I'm interested in it mainly for /tmp cleanup.  Using it for creating
> prerequisite directories of services could be useful, but you have to be careful
> to ensure the right dependencies between those services and systemd-tmpfiles.

Yes, I haven't looked closer on how to handle dependencies to tmpfiles. 
Maybe that is tricky. Maybe you're better off writing a setup-service 
that your service can depend on (maybe that setup service even could use 
systemd-tmpfiles to create the files). But I know Fedora is using 
tmpfiles to setup prerequisite directories.


   / Rickard




More information about the nix-dev mailing list