learn-flakes-the-fun-way/what-is-my-ip.nix
2024-07-08 09:35:53 -05:00

6 lines
152 B
Nix

{pkgs}:
pkgs.writeShellScriptBin "what-is-my-ip" ''
${pkgs.curl}/bin/curl -s http://httpbin.org/get | \
${pkgs.jq}/bin/jq --raw-output .origin
''