diff --git a/dots/.config/hypr/hyprland/scripts/start_geoclue_agent.sh b/dots/.config/hypr/hyprland/scripts/start_geoclue_agent.sh index e464d0531..b4b8fa14d 100755 --- a/dots/.config/hypr/hyprland/scripts/start_geoclue_agent.sh +++ b/dots/.config/hypr/hyprland/scripts/start_geoclue_agent.sh @@ -7,13 +7,16 @@ if pgrep -f 'geoclue-2.0/demos/agent' > /dev/null; then fi # List of known possible GeoClue agent paths -AGENT_PATHS=" -/usr/libexec/geoclue-2.0/demos/agent -/usr/lib/geoclue-2.0/demos/agent -" +AGENT_PATHS=( + /usr/libexec/geoclue-2.0/demos/agent + /usr/lib/geoclue-2.0/demos/agent + "$HOME/.nix-profile/libexec/geoclue-2.0/demos/agent" + "$HOME/.nix-profile/lib/geoclue-2.0/demos/agent" + /run/current-system/sw/libexec/geoclue-2.0/demos/agent +) # Find the first valid agent path -for path in $AGENT_PATHS; do +for path in "${AGENT_PATHS[@]}"; do if [ -x "$path" ]; then echo "Starting GeoClue agent from: $path" "$path" & # starts in the background diff --git a/sdata/dist-nix/home-manager/home.nix b/sdata/dist-nix/home-manager/home.nix index 39d84584e..e16b6d288 100644 --- a/sdata/dist-nix/home-manager/home.nix +++ b/sdata/dist-nix/home-manager/home.nix @@ -21,14 +21,6 @@ ## Allow fontconfig to discover fonts in home.packages fonts.fontconfig.enable = true; - # home.sessionVariables.NIXOS_OZONE_WL = "1"; - wayland.windowManager.hyprland = { - ## Make sure home-manager not generate ~/.config/hypr/hyprland.conf - systemd.enable = false; plugins = []; settings = {}; extraConfig = ""; - enable = true; - ## Use NixGL - package = config.lib.nixGL.wrap pkgs.hyprland; - }; home = { packages = with pkgs; [ @@ -64,10 +56,16 @@ playerctl #playerctl ### illogical-impulse-backlight - # TODO: geoclue is used in https://github.com/end-4/dots-hyprland/blob/0551c010b586dbf5578c32de2735698cca0801a7/dots/.config/hypr/hyprland/scripts/start_geoclue_agent.sh with hardcoded absolute path to search the agent. Below will not work without futher tweaks in that start_geoclue_agent.sh - geoclue2 # geoclue + # TODO: geoclue agent is used in .config/hypr/hyprland/scripts/start_geoclue_agent.sh with hardcoded path under /usr/ . + # If installed by Nix, then the agent path will be ${cfg.package}/libexec/geoclue-2.0/demos/agent , where ${cfg.package} is defined by Nix, see https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/desktops/geoclue2.nix . + # it won't work without futher tweaks. + # geoclue2 # geoclue + (geoclue2.override { withDemoAgent = true; }) brightnessctl # brightnessctl ddcutil # ddcutil + ] + ++ [ + (config.lib.nixGL.wrap pkgs.hyprland) ]; }//home_attrs; }