forked from Shinonome/dots-hyprland
Tweak geoclue for via-nix
This commit is contained in:
@@ -7,13 +7,16 @@ if pgrep -f 'geoclue-2.0/demos/agent' > /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# List of known possible GeoClue agent paths
|
# List of known possible GeoClue agent paths
|
||||||
AGENT_PATHS="
|
AGENT_PATHS=(
|
||||||
/usr/libexec/geoclue-2.0/demos/agent
|
/usr/libexec/geoclue-2.0/demos/agent
|
||||||
/usr/lib/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
|
# Find the first valid agent path
|
||||||
for path in $AGENT_PATHS; do
|
for path in "${AGENT_PATHS[@]}"; do
|
||||||
if [ -x "$path" ]; then
|
if [ -x "$path" ]; then
|
||||||
echo "Starting GeoClue agent from: $path"
|
echo "Starting GeoClue agent from: $path"
|
||||||
"$path" & # starts in the background
|
"$path" & # starts in the background
|
||||||
|
|||||||
@@ -21,14 +21,6 @@
|
|||||||
## Allow fontconfig to discover fonts in home.packages
|
## Allow fontconfig to discover fonts in home.packages
|
||||||
fonts.fontconfig.enable = true;
|
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 = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
@@ -64,10 +56,16 @@
|
|||||||
playerctl #playerctl
|
playerctl #playerctl
|
||||||
|
|
||||||
### illogical-impulse-backlight
|
### 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
|
# TODO: geoclue agent is used in .config/hypr/hyprland/scripts/start_geoclue_agent.sh with hardcoded path under /usr/ .
|
||||||
geoclue2 # geoclue
|
# 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
|
brightnessctl # brightnessctl
|
||||||
ddcutil # ddcutil
|
ddcutil # ddcutil
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
(config.lib.nixGL.wrap pkgs.hyprland)
|
||||||
];
|
];
|
||||||
}//home_attrs;
|
}//home_attrs;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user