diff --git a/config/home-manager/services/gammastep.nix b/config/home-manager/services/gammastep.nix new file mode 100644 index 0000000..68bd073 --- /dev/null +++ b/config/home-manager/services/gammastep.nix @@ -0,0 +1,17 @@ +{lib, ...}: { + services.gammastep = { + enable = true; + tray = true; + provider = "geoclue2"; + }; + + systemd.user.services.gammastep = { + Unit = { + PartOf = lib.mkForce []; + After = lib.mkForce ["graphical-session.target"]; + }; + Service = { + Slice = lib.mkForce "background-graphical.slice"; + }; + }; +} diff --git a/config/nixos/services/location.nix b/config/nixos/services/location.nix new file mode 100644 index 0000000..b5eb16d --- /dev/null +++ b/config/nixos/services/location.nix @@ -0,0 +1,15 @@ +{ + location.provider = "geoclue2"; + + services.geoclue2 = { + enable = true; + geoProviderUrl = "https://beacondb.net/v1/geolocate"; + submissionUrl = "https://beacondb.net/v2/geosubmit"; + submissionNick = "geoclue"; + + appConfig.gammastep = { + isAllowed = true; + isSystem = false; + }; + }; +} diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index 7f739c6..a0090ac 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -24,17 +24,18 @@ in { nixos "${nixos}/hardware/uni-sync.nix" - "${nixos}/programs/games.nix" - "${nixos}/services/logind.nix" "${nixos}/services/greetd.nix" "${nixos}/programs/hyprland.nix" "${nixos}/services/gnome.nix" + "${nixos}/programs/games.nix" + "${nixos}/services/documentation.nix" "${nixos}/services/flatpak.nix" + "${nixos}/services/location.nix" ]; home-manager = { @@ -54,6 +55,7 @@ in { "${hm}/services/flatpak.nix" "${hm}/services/syncthing.nix" + "${hm}/services/gammastep.nix" ]; extraSpecialArgs = specialArgs; }; diff --git a/hosts/vamos/default.nix b/hosts/vamos/default.nix index 0d59312..c0b50d4 100644 --- a/hosts/vamos/default.nix +++ b/hosts/vamos/default.nix @@ -37,6 +37,8 @@ in { "${nixos}/services/mail.nix" "${nixos}/services/documentation.nix" + + "${nixos}/services/location.nix" ]; home-manager = { @@ -55,6 +57,8 @@ in { "${hm}/services/syncthing.nix" "${hm}/terminal/emulators/foot.nix" + + "${hm}/services/gammastep.nix" ]; extraSpecialArgs = specialArgs; };