about summary refs log tree commit diff
path: root/packages/myip.nix
blob: a830139c2714ac2f2928a8f2b5d91f96681a128a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
{
  dnsutils,
  writeShellApplication,
}:
writeShellApplication {
  name = "myip";
  runtimeInputs = [dnsutils];
  text = ''
    dig -4 +short @resolver1.opendns.com myip.opendns.com A
    dig -6 +short @resolver1.opendns.com myip.opendns.com AAAA
  '';
}

Consider giving Nix/NixOS a try! <3