From aa74a8f664e0671b9d199063376d505db016e9f7 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Thu, 15 Aug 2024 00:54:02 +0300 Subject: [PATCH] home/services/wayland/gammastep: init Currently, provider = "geoclue2" does not work due to geoclue not working. Geoclue used Mozilla's Geolocation API until 2024-07-12, after which it was shut down. Now it needs to switch to a different geolocation provider. See https://codeberg.org/beacondb/beacondb/issues/5 --- home/profiles/io/default.nix | 1 + home/services/wayland/gammastep.nix | 15 +++++++++++++++ system/services/location.nix | 12 +++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 home/services/wayland/gammastep.nix diff --git a/home/profiles/io/default.nix b/home/profiles/io/default.nix index 8a24e18f..f5edf749 100644 --- a/home/profiles/io/default.nix +++ b/home/profiles/io/default.nix @@ -26,6 +26,7 @@ ../../services/system/udiskie.nix # wayland-specific + ../../services/wayland/gammastep.nix ../../services/wayland/hyprpaper.nix ../../services/wayland/hypridle.nix diff --git a/home/services/wayland/gammastep.nix b/home/services/wayland/gammastep.nix new file mode 100644 index 00000000..18aec243 --- /dev/null +++ b/home/services/wayland/gammastep.nix @@ -0,0 +1,15 @@ +{ + services.gammastep = { + enable = true; + tray = true; + + # stopgap until geoclue's wifi location is fixed + provider = "manual"; + latitude = 45.0; + longitude = 25.0; + + enableVerboseLogging = true; + + settings.general.adjustment-method = "wayland"; + }; +} diff --git a/system/services/location.nix b/system/services/location.nix index 5cc0358c..48601720 100644 --- a/system/services/location.nix +++ b/system/services/location.nix @@ -3,5 +3,15 @@ location.provider = "geoclue2"; # provide location - services.geoclue2.enable = true; + services.geoclue2 = { + enable = true; + geoProviderUrl = "https://beacondb.net/v1/geolocate"; + submissionUrl = "https://beacondb.net/v2/geosubmit"; + submissionNick = "geoclue"; + + appConfig.gammastep = { + isAllowed = true; + isSystem = false; + }; + }; }