summaryrefslogtreecommitdiff
path: root/packages/my-ip.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2026-06-15 23:45:16 -0700
committerKleidi Bujari <mail@4kb.net>2026-06-15 23:45:16 -0700
commit503e88c5e307c0fe8a9e72f01a23f1e6730c6928 (patch)
tree3042250b352ae0b87544266be939daec19e3ca07 /packages/my-ip.nix
parenta1fe17ea8208d8a75b26b6f512f94d23078f82e5 (diff)
downloaddepot-503e88c5e307c0fe8a9e72f01a23f1e6730c6928.tar.gz
depot-503e88c5e307c0fe8a9e72f01a23f1e6730c6928.tar.bz2
depot-503e88c5e307c0fe8a9e72f01a23f1e6730c6928.zip
publish my-ip pkg for printing public ip addrs
Diffstat (limited to 'packages/my-ip.nix')
-rw-r--r--packages/my-ip.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/my-ip.nix b/packages/my-ip.nix
new file mode 100644
index 0000000..0147bcd
--- /dev/null
+++ b/packages/my-ip.nix
@@ -0,0 +1,10 @@
+{ writeShellApplication, dnsutils, ... }:
+
+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
+ '';
+}