diff --git a/hosts/carbon/configuration.nix b/hosts/carbon/configuration.nix index c9cc78f..df504e1 100644 --- a/hosts/carbon/configuration.nix +++ b/hosts/carbon/configuration.nix @@ -13,6 +13,7 @@ ./net-iot.nix ./net-lte.nix ./net-voip.nix + ./ntp.nix ./ppp.nix ]; diff --git a/hosts/carbon/net-iot.nix b/hosts/carbon/net-iot.nix index be18bfc..43e3c57 100644 --- a/hosts/carbon/net-iot.nix +++ b/hosts/carbon/net-iot.nix @@ -17,6 +17,9 @@ { address = "10.152.205.1"; prefixLength = 24; } ]; + # Enable NTP + networking.firewall.interfaces."net-iot".allowedUDPPorts = [ 123 ]; + services.radvd.config = '' interface net-iot { AdvSendAdvert on; @@ -53,6 +56,10 @@ name = "domain-name"; data = "iot.clerie.de"; } + { + name = "time-servers"; + data = "10.152.0.1"; + } ]; } ]; diff --git a/hosts/carbon/ntp.nix b/hosts/carbon/ntp.nix new file mode 100644 index 0000000..39663c8 --- /dev/null +++ b/hosts/carbon/ntp.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + + services.chrony = { + enable = true; + extraConfig = '' + # Enable NTP server mode + allow + bindaddress fd00:152:152::1 + bindaddress 10.152.0.1 + ''; + }; + +}