Find ip-adrress


I want to use my machine’s IP address in a configuration file, Is there a function call to find my machine’s IP?


The only way to do I/O in Dhall is to use imports. So if you want to rely on a service like you can simply write as Text

If you don’t want to rely on some remote service, you could alternatively put the IP address into a local file and import that, e.g.

./my-ip-address.txt as Text


What @sjakobi said, or you could use some non-Dhall means to get it in an environment variable, which might or might not be better suited to your usecase.


That’s great, thank you!