From 51431acee8234e11c7536f9a64ebe0f29ec0d4f7 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 18 Nov 2024 19:48:36 +0100 Subject: [PATCH] Update groclue --- nixos/common/desktops/plasma6/default.nix | 11 ----------- nixos/common/services/geoclue.nix | 10 ++++++++++ nixos/default.nix | 1 + nixos/hosts/nixos-framework/default.nix | 1 - nixos/small.nix | 3 ++- 5 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 nixos/common/services/geoclue.nix 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