From e6b2332afa4d70c46ee166fc8819f61d3d9b8fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 14 Jun 2023 16:52:09 +0200 Subject: Enable systemd-timesyncd to prevent clock drift --- modules/wsl-distro.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index 22a5a23..fd0c6e2 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -135,8 +135,8 @@ in services = { firewall.enable = false; systemd-resolved.enable = lib.mkDefault false; - # system clock cannot be changed - systemd-timesyncd.enable = false; + # systemd-timesyncd actually works in WSL and without it the clock can drift + systemd-timesyncd.unitConfig.ConditionVirtualization = ""; }; # Don't allow emergency mode, because we don't have a console. -- cgit v1.2.3