Configure ddclient with duckdns as a provider

This commit is contained in:
coolneng 2021-03-30 14:01:53 +02:00
parent 41ab42449a
commit 826530e5bb
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ let password = builtins.readFile /var/keys/ddclient;
in {
# Assign a static IP # Assign a static IP
networking = { networking = {
hostName = "unit"; hostName = "unit";
@ -31,6 +33,15 @@
}; };
}; };
# Dynamic DNS configuration
services.ddclient = {
enable = true;
quiet = true;
protocol = "duckdns";
domains = [ "coace.duckdns.org" ];
inherit password;
};
# Firewall configuration # Firewall configuration
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ allowedTCPPorts = [