From 9fcb66eaf0bebc02e18fe354cb7e7cd7de826f29 Mon Sep 17 00:00:00 2001 From: notohh Date: Thu, 19 Oct 2023 18:04:30 -0400 Subject: [PATCH] modules: add time module --- modules/README.md | 1 + modules/default.nix | 1 + modules/time.nix | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 modules/time.nix diff --git a/modules/README.md b/modules/README.md index 466a5df..c4f8f7f 100644 --- a/modules/README.md +++ b/modules/README.md @@ -15,5 +15,6 @@ name | description `sops` | configures sops-nix `swayidle` | idle manager daemon `system` | commonly shared system settings +`time` | force sets the time on all systems `users` | defines all hosts users & groups `virtualisation`| basic docker configuration \ No newline at end of file diff --git a/modules/default.nix b/modules/default.nix index c7048be..11dae0c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -10,5 +10,6 @@ ./openssh.nix ./virtualisation.nix ./sops.nix + ./time.nix ]; } diff --git a/modules/time.nix b/modules/time.nix new file mode 100644 index 0000000..234ccf9 --- /dev/null +++ b/modules/time.nix @@ -0,0 +1,23 @@ +_: { + services.chrony = { + enable = true; + servers = [ + # 0.us.pool.ntp.org + "134.215.114.62" + "192.189.65.187" + "96.245.170.99" + "192.92.6.30" + ]; + }; + + services.timesyncd = { + enable = true; + servers = [ + # 0.us.pool.ntp.org + "134.215.114.62" + "192.189.65.187" + "96.245.170.99" + "192.92.6.30" + ]; + }; +}