Skip to content

Commit

Permalink
fix: hardcode server timezone to UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Oct 15, 2024
1 parent 22cf136 commit 991d45e
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions nixos/_mixins/features/time/default.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
_: {
{
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;
# https://github.com/NixOS/nixpkgs/issues/321121
geoProviderUrl = "https://beacondb.net/v1/geolocate";
submissionNick = "geoclue";
submissionUrl = "https://beacondb.net/v2/geosubmit";
geoProviderUrl = "https://api.positon.xyz/v1/geolocate?key=test";
submissionUrl = "https://api.positon.xyz/v2/geosubmit?key=test";
submitData = false;
};
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";
};
}

0 comments on commit 991d45e

Please sign in to comment.