blob: 4aaa10f9dc8ae7c58d10e98f77eea1c6716022fd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
{
dnsutils,
lib,
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
'';
meta = {
description = "A dumb tool to get host's current public IP";
homepage = "https://git.azahi.cc/nixfiles";
license = lib.licenses.wtfpl;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.azahi ];
mainProgram = "myip";
};
}
|