From 522416952f2e2494d3baa6cb803e780ff0e0f46c Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Thu, 6 Jan 2022 14:17:21 +0100 Subject: [PATCH] Corrected time for lambda --- rpi.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/rpi.nix b/rpi.nix index 8b44cf0..f66c21c 100644 --- a/rpi.nix +++ b/rpi.nix @@ -41,6 +41,24 @@ ]; networking.defaultGateway = "129.199.134.254"; networking.nameservers = [ "8.8.8.8" ]; + + services.timesyncd.enable = true; + systemd.services.htpdate = { + description = "htpdate daemon"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "forking"; + PIDFile = "/run/htpdate.pid"; + ExecStart = lib.concatStringsSep " " [ + "${pkgs.htpdate}/bin/htpdate" + "-D -u nobody" + "-a -s" + "-l" + "www.linux.org" + ]; + }; + }; documentation.nixos.enable = false; nix.gc.automatic = true;