From 2b403be200ea553fb2122d79046d37489d9b14f5 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 21 May 2024 22:37:04 -0400 Subject: [PATCH] sway/gammastep: added automatic location awareness with geoclue2 --- homeManagerModules/desktop/sway/redShift.nix | 3 ++- nixosModules/desktop/sway/default.nix | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/homeManagerModules/desktop/sway/redShift.nix b/homeManagerModules/desktop/sway/redShift.nix index f09be7ce..54723daf 100644 --- a/homeManagerModules/desktop/sway/redShift.nix +++ b/homeManagerModules/desktop/sway/redShift.nix @@ -7,7 +7,8 @@ config = lib.mkIf config.alyraffauf.desktop.sway.redShift { home.packages = with pkgs; [gammastep]; wayland.windowManager.sway.config.startup = [ - {command = "${lib.getExe pkgs.gammastep} -l 31.1:-94.1";} # TODO: automatic locations + {command = "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent";} + {command = "${lib.getExe pkgs.gammastep}";} ]; }; } diff --git a/nixosModules/desktop/sway/default.nix b/nixosModules/desktop/sway/default.nix index aa2d6fd6..320597e5 100644 --- a/nixosModules/desktop/sway/default.nix +++ b/nixosModules/desktop/sway/default.nix @@ -12,10 +12,11 @@ config = lib.mkIf config.alyraffauf.desktop.sway.enable { services = { - dbus.packages = [pkgs.gcr]; - udev.packages = [pkgs.swayosd]; - gnome.gnome-keyring.enable = true; blueman.enable = true; + dbus.packages = [pkgs.gcr]; + geoclue2.enable = true; + gnome.gnome-keyring.enable = true; + udev.packages = [pkgs.swayosd]; }; security.pam.services = {