diff --git a/nixos/common/desktops/plasma6/default.nix b/nixos/common/desktops/plasma6/default.nix index 428a8613..a362d1e2 100644 --- a/nixos/common/desktops/plasma6/default.nix +++ b/nixos/common/desktops/plasma6/default.nix @@ -4,17 +4,6 @@ # ./set-darkmode-service.nix ]; - services.geoclue2 = { - enable = true; - geoProviderUrl = "https://beacondb.net/v1/geolocate"; - }; - - # Will fail if started before Tailscale - networking.extraHosts = '' - 35.190.72.216 location.services.mozilla.com - ''; - - # Enable sound with pipewire. security.rtkit.enable = true; services.pipewire = { diff --git a/nixos/common/services/geoclue.nix b/nixos/common/services/geoclue.nix new file mode 100644 index 00000000..075f15ab --- /dev/null +++ b/nixos/common/services/geoclue.nix @@ -0,0 +1,10 @@ +{ lib, ... }: { + services.geoclue2 = { + enable = true; + geoProviderUrl = "https://beacondb.net/v1/geolocate"; + }; + + location.provider = lib.mkDefault "geoclue2"; + services.localtimed.enable = true; + services.automatic-timezoned.enable = true; +} diff --git a/nixos/default.nix b/nixos/default.nix index a2fa2c90..8015f842 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -11,6 +11,7 @@ ./common/services/tailscale.nix ./common/services/gnupg-agent.nix ./common/services/opensnitch.nix + ./common/services/geoclue.nix # Software ./common/software/cli/clean-hm.nix diff --git a/nixos/hosts/nixos-framework/default.nix b/nixos/hosts/nixos-framework/default.nix index 632c22e5..fb7608d7 100644 --- a/nixos/hosts/nixos-framework/default.nix +++ b/nixos/hosts/nixos-framework/default.nix @@ -38,7 +38,6 @@ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; # Set your time zone. time.timeZone = "Europe/Warsaw"; - location.provider = "geoclue2"; services.automatic-timezoned.enable = true; diff --git a/nixos/small.nix b/nixos/small.nix index d76cb229..03d1babe 100644 --- a/nixos/small.nix +++ b/nixos/small.nix @@ -9,7 +9,8 @@ ./common/services/tailscale.nix ./common/services/promtail.nix ./common/services/telegraf.nix - + ./common/services/geoclue.nix + # Software ./common/software/cli/clean-hm.nix ./common/packages/small.nix