summaryrefslogtreecommitdiff
path: root/hosts/kay/modules/dns/ddns.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-03-08 10:50:28 +0530
committersinanmohd <sinan@sinanmohd.com>2024-03-08 10:52:52 +0530
commitcd942d253bda8f511fdb921ea29f69f382a9368e (patch)
tree2c7aac5f66e5b614ecdd0871df23432bae4dc6db /hosts/kay/modules/dns/ddns.nix
parent2abeb90fbff1d33aadfec37ce80a6bc4d3551661 (diff)
repo: restructure source tree
Diffstat (limited to 'hosts/kay/modules/dns/ddns.nix')
-rw-r--r--hosts/kay/modules/dns/ddns.nix44
1 files changed, 0 insertions, 44 deletions
diff --git a/hosts/kay/modules/dns/ddns.nix b/hosts/kay/modules/dns/ddns.nix
deleted file mode 100644
index e6e417a..0000000
--- a/hosts/kay/modules/dns/ddns.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-{ pkgs, ... }: {
- services.pppd.script = {
- "02-ddns-ipv4" = {
- runtimeInputs = with pkgs; [ coreutils knot-dns ];
- type = "ip-up";
-
- text = ''
- cat <<- EOF | knsupdate
- server 2001:470:ee65::1
- zone sinanmohd.com.
-
- update delete sinanmohd.com. A
- update add sinanmohd.com. 180 A $4
-
- update delete mail.sinanmohd.com. A
- update add mail.sinanmohd.com. 180 A $4
-
- send
- EOF
- '';
- };
-
- "02-ddns-ipv6" = {
- runtimeInputs = with pkgs; [ coreutils knot-dns iproute2 gnugrep ];
- type = "ipv6-up";
-
- text = ''
- while ! ipv6="$(ip -6 addr show dev "$1" scope global | grep -o '[0-9a-f:]*::1')"; do
- sleep 0.2
- done
-
- cat <<- EOF | knsupdate
- server 2001:470:ee65::1
- zone sinanmohd.com.
-
- update delete sinanmohd.com. AAAA
- update add sinanmohd.com. 180 AAAA $ipv6
-
- send
- EOF
- '';
- };
- };
-}