Fix time syncing

Can't believe I was ~5 seconds off on all my computers for this long x)
This commit is contained in:
Geoffrey Frogeye 2024-12-25 15:22:07 +01:00
parent 0ac79c3d0c
commit 8c45c1989c
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -53,24 +53,38 @@ in
})
];
# wireless support via wpa_supplicant
networking.wireless = {
enable = true;
extraConfig = ''
country=NL
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
'';
# Public wireless networks
networks = lib.genAttrs [
"EurostarTrainsWiFi"
"_SNCF gare-gratuit"
"_SNCF_WIFI_INOUI"
"Wifi in de trein"
"WiFi in de trein"
"_WIFI_LYRIA"
"WIFIonICE"
] (ssid: { });
userControlled.enable = true; # Allow some control with wpa_cli
wireless = {
enable = true;
extraConfig = ''
country=NL
'';
# Public wireless networks
networks = lib.genAttrs [
"EurostarTrainsWiFi"
"_SNCF gare-gratuit"
"_SNCF_WIFI_INOUI"
"Wifi in de trein"
"WiFi in de trein"
"_WIFI_LYRIA"
"WIFIonICE"
] (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" ];