diff options
| author | Mel <einebeere@gmail.com> | 2024-11-27 20:32:39 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-11-27 20:32:39 +0100 |
| commit | 330f346d0801a8f11db4bc83ba62fcdc14fbcb56 (patch) | |
| tree | 9b4ab69f59706d28e06aaca0750af21eed7311d2 | |
| parent | 6195d26d4d8296aec4e699246cbb859a832cba19 (diff) | |
| download | network-330f346d0801a8f11db4bc83ba62fcdc14fbcb56.tar.zst network-330f346d0801a8f11db4bc83ba62fcdc14fbcb56.zip | |
Use ddclient to be publicly reachable
Signed-off-by: Mel <einebeere@gmail.com>
| -rw-r--r-- | machines/corsac/default.nix | 1 | ||||
| -rw-r--r-- | modules/ddns.nix | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/machines/corsac/default.nix b/machines/corsac/default.nix index 75a9f05..ba913e2 100644 --- a/machines/corsac/default.nix +++ b/machines/corsac/default.nix @@ -8,6 +8,7 @@ ./devices.nix ../../modules/dns.nix + ../../modules/ddns.nix ../../modules/nfs.nix ../../modules/jellyfin.nix ]; diff --git a/modules/ddns.nix b/modules/ddns.nix new file mode 100644 index 0000000..103f3a9 --- /dev/null +++ b/modules/ddns.nix @@ -0,0 +1,20 @@ +{ me, ... }: + +let + domain = "rnrd.eu"; +in +{ + services.ddclient = { + enable = true; + + # NameCheap DDNS parameters + use = "web, web=dynamicdns.park-your-domain.com/getip"; + protocol = "namecheap"; + server = "dynamicdns.park-your-domain.com"; + + username = "rnrd.eu"; + domains = [ "${me.name}.${domain}" ]; + # TODO: use age + passwordFile = "/home/mel/ddclient.pw"; + }; +} |
