diff options
| author | Fuwn <[email protected]> | 2024-10-08 02:32:13 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-08 02:32:13 -0700 |
| commit | b07259ba6746fd29c94d934c0477f414fd94f739 (patch) | |
| tree | 93feb128edb27de41aed75d357b6e510f1b2ce55 /modules/core/networking | |
| parent | dozzle: expose to the world (diff) | |
| download | nixos-config-b07259ba6746fd29c94d934c0477f414fd94f739.tar.xz nixos-config-b07259ba6746fd29c94d934c0477f414fd94f739.zip | |
core: use chrony for ntp
Diffstat (limited to 'modules/core/networking')
| -rw-r--r-- | modules/core/networking/default.nix | 8 | ||||
| -rw-r--r-- | modules/core/networking/ntp.nix | 14 |
2 files changed, 15 insertions, 7 deletions
diff --git a/modules/core/networking/default.nix b/modules/core/networking/default.nix index b8f221d..83d21c7 100644 --- a/modules/core/networking/default.nix +++ b/modules/core/networking/default.nix @@ -2,6 +2,7 @@ { imports = [ ./firewall + ./ntp.nix ./pki.nix ./resolved.nix ./tailscale.nix @@ -16,12 +17,5 @@ "45.90.30.0#${secrets.nextdns_id}.dns.nextdns.io" "2a07:a8c1::#${secrets.nextdns_id}.dns.nextdns.io" ]; - - timeServers = [ - "0.nixos.pool.ntp.org" - "1.nixos.pool.ntp.org" - "2.nixos.pool.ntp.org" - "3.nixos.pool.ntp.org" - ]; }; } diff --git a/modules/core/networking/ntp.nix b/modules/core/networking/ntp.nix new file mode 100644 index 0000000..2aee23f --- /dev/null +++ b/modules/core/networking/ntp.nix @@ -0,0 +1,14 @@ +{ config, ... }: +{ + networking.timeServers = [ + "0.nixos.pool.ntp.org" + "1.nixos.pool.ntp.org" + "2.nixos.pool.ntp.org" + "3.nixos.pool.ntp.org" + ]; + + services.chrony = { + enable = true; + servers = config.networking.timeServers; + }; +} |