I have written some bash scripts that helps me to manage my nix configuration. Part of what the scripts do is to help me ssh into the hosts that are managed by nix. In my nix config I have specified the static IP addresses of some hosts. What would be a good way for my script to “know” what IP address the nix config specifies?
To illustrate, I chose a random example from Github. In this file there is an IP address specified
What would be an accurate and clean way to parse that from a shell script? I could parse it with grep and regex but perhaps I can somehow evaluate the nix config to return it?