Skip to content

Commit d0d3636

Browse files
authored
Merge pull request #957 from ljxfstorm/f/remove-chronyd
Remove redundant `chronyd`
2 parents be4af80 + 52c8239 commit d0d3636

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

modules/wsl-distro.nix

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,8 @@ in
216216
cfg.extraBin
217217
);
218218

219-
# WSL expects Chrony to be at /sbin/chrony and read /etc/chrony, ours does neither, so recreate the setup (mostly)
220-
# The really important bit is the refclock - otherwise the clock runs ahead randomly.
221-
# https://github.com/microsoft/WSL/blob/2eac1dafeca0d88320ff2260c5d5fe5dbb09cd33/src/linux/init/main.cpp#L3796
222-
# By default we shouldn't use the NixOS NTP servers since the clock is set by WSL.
223-
services.chrony = {
224-
enable = true;
225-
extraConfig = ''
226-
makestep 1.0 3
227-
leapsectz right/UTC
228-
refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0
229-
'';
230-
servers = mkDefault [ ];
231-
};
219+
# Disable `systemd-timesyncd` to prevent conflict with the `chronyd` in the WSL root namespace
220+
services.timesyncd.enable = false;
232221

233222
warnings = flatten [
234223
(optional (config.services.resolved.enable && config.wsl.wslConf.network.generateResolvConf)

0 commit comments

Comments
 (0)