Re: [Nix-dev] How to create dirs needed by a module before it runs?

2015-01-23 Thread Jeff Johnson
Oh weird, maybe I need to go back and see if I did something wrong with the hostname, because now that I think about it you're right--they should all be evaluated at once. I think the system.activationScripts are an exception though. They seem to run after everything's evaluated (they print their

Re: [Nix-dev] How to create dirs needed by a module before it runs?

2015-01-23 Thread Jeff Johnson
In case there isn't a hook I just thought of the obvious solution: wrap `nixos-rebuild` in a shell script. On 1/23/15, Jeff Johnson jef...@gmail.com wrote: Oh weird, maybe I need to go back and see if I did something wrong with the hostname, because now that I think about it you're right--they

[Nix-dev] How to create dirs needed by a module before it runs?

2015-01-23 Thread Jeff Johnson
Hi all! I'm trying to set up tarsnap on nixos. This is my tarsnap.nix so far: config: let keySrc = ../rawpriv/tarsnap; cacheDir = /var/cache/tarsnap; rcSrc = builtins.toFile tarsnaprc '' aggressive-networking # TODO is this a good idea?

Re: [Nix-dev] How to create dirs needed by a module before it runs?

2015-01-23 Thread Wout Mertens
What do you mean with only get installed at the end? Also, networking.hostName should work, the whole config gets evaluated at once. There's no running in Nix, only side-effects of evaluation. Wout. On Fri Jan 23 2015 at 7:45:38 PM Jeff Johnson jef...@gmail.com wrote: Hi all! I'm trying to

Re: [Nix-dev] How to create dirs needed by a module before it runs?

2015-01-23 Thread Marc Weber
Why not cd into the modules directory and grep for mkdir? Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev

Re: [Nix-dev] How to create dirs needed by a module before it runs?

2015-01-23 Thread Jeff Johnson
That would work except the mkdir commands are evaluated using ${nixVars} so the dirs aren't literally in there. I think I'm more comfortable adding duplicated variables one by one in the shell script than trying to do any magic. Jeff On Fri, Jan 23, 2015 at 11:49 AM, Marc Weber