learn-flakes-the-fun-way/what-is-my-ip.nix

6 lines
152 B
Nix
Raw Normal View History

2024-07-08 09:35:53 -05:00
{pkgs}:
pkgs.writeShellScriptBin "what-is-my-ip" ''
${pkgs.curl}/bin/curl -s http://httpbin.org/get | \
${pkgs.jq}/bin/jq --raw-output .origin
''