Fix time syncing
Can't believe I was ~5 seconds off on all my computers for this long x)
This commit is contained in:
parent
0ac79c3d0c
commit
8c45c1989c
|
@ -53,7 +53,17 @@ in
|
|||
})
|
||||
];
|
||||
# wireless support via wpa_supplicant
|
||||
networking.wireless = {
|
||||
networking = {
|
||||
# Tell the time synchronisation service when we got/lost the connection
|
||||
dhcpcd.runHook = ''
|
||||
if $if_up; then
|
||||
${config.services.chrony.package}/bin/chronyc online
|
||||
elif $if_down; then
|
||||
${config.services.chrony.package}/bin/chronyc offline
|
||||
fi
|
||||
'';
|
||||
|
||||
wireless = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
country=NL
|
||||
|
@ -70,7 +80,11 @@ in
|
|||
] (ssid: { });
|
||||
userControlled.enable = true; # Allow some control with wpa_cli
|
||||
};
|
||||
};
|
||||
|
||||
# Wait until there's a connection to fetch time
|
||||
services.chrony.serverOption = "offline";
|
||||
|
||||
systemd.services.wifi_apply = {
|
||||
after = [ "wpa_supplicant.service" ];
|
||||
wantedBy = [ "wpa_supplicant.service" ];
|
||||
|
|
Loading…
Reference in a new issue