summaryrefslogtreecommitdiff
path: root/packages/myip.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-08-12 22:53:53 +0300
committerAzat Bahawi <azat@bahawi.net>2022-08-12 22:53:53 +0300
commit61b94f0dd06cac0f7dcd38cce80f2a7ab8376098 (patch)
treeb703a9fe11eae6c4cae4e4682f02caf0caa171d0 /packages/myip.nix
2022-08-12
Diffstat (limited to 'packages/myip.nix')
-rw-r--r--packages/myip.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/myip.nix b/packages/myip.nix
new file mode 100644
index 0000000..a830139
--- /dev/null
+++ b/packages/myip.nix
@@ -0,0 +1,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
+ '';
+}