Re: [Nix-dev] Variable data files

2014-04-03 Thread Matthew Sackman
On Thu, Apr 03, 2014 at 10:52:09AM -0500, Colin Putney wrote:
> 1) Is there a standard place for application installed in the nix store to
> use for variable data?

If it's run by the system (eg started by systemd) then it should
probably be somewhere under /var (often /var/lib, but I've never
understood why).

If it's run by the user then somewhere under ~/. Eg the rabbitmq package
uses ~/.rabbitmq/$version/

> 2) Is there a standard place for application logs?

Same logic applies, with /var/log in particular for system daemons.

> 3) I'm going to be deploying with nixops. What's the best way to handle
> creating these directories setting ownership and permissions etc.

If it's started by systemd then I'd personally suggest preStart.
Otherwise, whatever the script is the user runs to start it (i.e. you
may need to create a wrapper of sorts).

Matthew
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Variable data files

2014-04-03 Thread Colin Putney
Hi folks,

I'm packaging an app that I'd like to deploy on NixOS, and trying to figure
out how to handle data files that the app needs to be able to write to. So
here some newbie questions:

1) Is there a standard place for application installed in the nix store to
use for variable data?

2) Is there a standard place for application logs?

3) I'm going to be deploying with nixops. What's the best way to handle
creating these directories setting ownership and permissions etc.

Thanks,

Colin
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev