[Nix-dev] nixops logical network values depend on physical network deployed to

Richard Wallace rwallace at thewallacepack.net
Sun Jun 14 04:46:51 CEST 2015


Hello all,

I have a case where a value in my logical network configuration will be
different depending on what physical network is deployed to. It's the base
URI of the web service, which will be http://localhost:8080/ when deploying
to a local virtualbox instance and the public address otherwise. This value
is being set as part of the systemd environment

      systemd.services.myservice = {
        <snip/>
        environment = {
          PORT = "8080";
          BASE_URI = "
http://ec2-52-8-23-225.us-west-1.compute.amazonaws.com/";
          DATABASE_URL = "postgresql://localhost/hiplambda";
        };

I'd also like to be able to vary the DATABASE_URL so I can use Amazon RDS
on EC2.  I tried a few variations of pkgs.lib.mkIf, but couldn't get it
working.

Thanks,
Rich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150613/1fe0ac7a/attachment.html 


More information about the nix-dev mailing list