[Nix-dev] Multiple instances - detecting resource collisions - nixos module system question

Shea Levy shea at shealevy.com
Mon Jan 19 03:44:00 CET 2015


My prediction: This will cause more headaches than it will save.

> On Jan 14, 2015, at 10:17 PM, Marc Weber <marco-oweber at gmx.de> wrote:
> 
> If you use multiple apaches/nginx/mysql/postgresql/whatever instances
> its likely to miss adjusting the port or whatsoever. Therefore I'd like
> to implement a simple "resource tracking" module which fails if a
> resource such as tcp/ip port or socket or such gets used multiple times.
> 
> It should look like this: http://dpaste.com/10RKJSQ
> 
> 
> A test like this:
>       resources.tcp-ports."80" = {};
> 
> causes:
>  The option `resources.tcp-ports.80.allowCollisions' defined in `/etc/nixos/nixpkgs/nixos/modules/misc/resources.nix' does not exist.
> 
> which I don't get because the dpaste sets a default value for
> allowCollisions.
> 
> Thus does anybody just spot what I'm doing wrong?
> 
> If we are at it: Eelco Dolstra proposed "services.mysql.services" or
> such. What about services.mysqls ? We could deprecade services.mysql
> then and ask users to switch slowly. No naming collisions. Naming is
> short and could be adopted to other services.
> 
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list