-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: hardcode server timezone to UTC
- Loading branch information
1 parent
fc43430
commit 6116c95
Showing
1 changed file
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,35 @@ | ||
_: { | ||
{ | ||
hostname, | ||
lib, | ||
... | ||
}: | ||
let | ||
isServer = hostname == "malak" || hostname == "revan"; | ||
useGeoclue = !isServer; | ||
in | ||
{ | ||
location = { | ||
provider = "geoclue2"; | ||
}; | ||
|
||
services = { | ||
automatic-timezoned.enable = true; | ||
automatic-timezoned.enable = useGeoclue; | ||
geoclue2 = { | ||
enable = true; | ||
enableNmea = false; | ||
# https://github.com/NixOS/nixpkgs/issues/321121 | ||
geoProviderUrl = "https://beacondb.net/v1/geolocate"; | ||
submissionNick = "geoclue"; | ||
submissionUrl = "https://beacondb.net/v2/geosubmit"; | ||
geoProviderUrl = "https://www.googleapis.com/geolocation/v1/geolocate?key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM"; | ||
}; | ||
localtimed.enable = true; | ||
localtimed.enable = useGeoclue; | ||
}; | ||
|
||
# Prevent "Failed to open /etc/geoclue/conf.d/:" errors | ||
systemd.tmpfiles.rules = [ | ||
"d /etc/geoclue/conf.d 0755 root root" | ||
]; | ||
|
||
time = { | ||
hardwareClockInLocalTime = true; | ||
timeZone = lib.mkIf isServer "UTC"; | ||
}; | ||
} |