dotfiles/modules/nixos/timezone.nix

20 lines
544 B
Nix
Raw Normal View History

2022-12-21 21:18:03 +00:00
{ config, pkgs, lib, ... }: {
2022-04-26 01:54:53 +00:00
2022-12-21 21:18:03 +00:00
config = lib.mkIf pkgs.stdenv.isLinux {
2022-04-26 01:54:53 +00:00
2022-12-21 21:18:03 +00:00
# Service to determine location for time zone
services.geoclue2.enable = true;
services.geoclue2.enableWifi = false; # Breaks when it can't connect
location = { provider = "geoclue2"; };
2022-06-05 12:32:23 +00:00
2022-12-21 21:18:03 +00:00
# Enable local time based on time zone
services.localtimed.enable = true;
# Required to get localtimed to talk to geoclue2
services.geoclue2.appConfig.localtimed.isSystem = true;
services.geoclue2.appConfig.localtimed.isAllowed = true;
};
2022-04-26 01:54:53 +00:00
}