diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-03-30 21:58:55 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-03-30 21:58:55 -0700 |
| commit | 4acf85db722ebe7e019e7427436083b3b9f4959e (patch) | |
| tree | 6d5b416ad605730a6d573d1b4178c7676dc8a015 /config/hypr/scripts/Polkit-NixOS.sh | |
| parent | 89e10cd0c0331fc727889d41e34309db1fb5735f (diff) | |
| parent | e4b9059d346e6a6dbd6216cd1fb5e41085bb6e7b (diff) | |
Merge remote-tracking branch 'upstream/main'
Diffstat (limited to 'config/hypr/scripts/Polkit-NixOS.sh')
| -rwxr-xr-x | config/hypr/scripts/Polkit-NixOS.sh | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/config/hypr/scripts/Polkit-NixOS.sh b/config/hypr/scripts/Polkit-NixOS.sh index 925deab5..c1e6e0a2 100755 --- a/config/hypr/scripts/Polkit-NixOS.sh +++ b/config/hypr/scripts/Polkit-NixOS.sh @@ -1,6 +1,26 @@ #!/usr/bin/env bash -# /* ---- 💫 https://github.com/LinuxBeginnings 💫 ---- */ ## -# For NixOS starting of polkit-gnome. Dec 2023, the settings stated in NixOS wiki does not work so have to manual start it +# ================================================== +# KoolDots (2026) +# Project URL: https://github.com/LinuxBeginnings +# License: GNU GPLv3 +# SPDX-License-Identifier: GPL-3.0-or-later +# ================================================== +# For NixOS starting of polkit agents. Prefer xfce4-polkit, fallback to polkit-gnome. + +# Find all xfce4-polkit executables in the Nix store +xfce_polkit_paths=$(find /nix/store -name 'xfce4-polkit' -type f 2>/dev/null) + +for xfce_polkit_path in $xfce_polkit_paths; do + # Extract the directory containing the executable + xfce_polkit_dir=$(dirname "$xfce_polkit_path") + + # Check if the executable is valid and exists + if [ -x "$xfce_polkit_dir/xfce4-polkit" ]; then + # Start the xfce4-polkit Authentication Agent + "$xfce_polkit_dir/xfce4-polkit" & + exit 0 + fi +done # Find all polkit-gnome executables in the Nix store polkit_gnome_paths=$(find /nix/store -name 'polkit-gnome-authentication-agent-1' -type f 2>/dev/null) @@ -18,4 +38,4 @@ for polkit_gnome_path in $polkit_gnome_paths; do done # If no valid executable is found, report an error -echo "No valid Polkit-GNOME Authentication Agent executable found."
\ No newline at end of file +echo "No valid polkit authentication agent executable found." |
