From 67b28f356fef3d9e2efe47ac4b917cab6579c99f Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 3 May 2025 16:15:59 +1000 Subject: [PATCH] hypr: add gnome polkit agent --- modules/linux/hyprland.nix | 18 ++++++++++++++++++ stow/.config/hypr/hyprland.conf | 12 +++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/modules/linux/hyprland.nix b/modules/linux/hyprland.nix index 9b5649e..4fc5318 100644 --- a/modules/linux/hyprland.nix +++ b/modules/linux/hyprland.nix @@ -27,4 +27,22 @@ ]; programs.ssh.startAgent = true; + + # enable polkit + security.polkit.enable = true; + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; } diff --git a/stow/.config/hypr/hyprland.conf b/stow/.config/hypr/hyprland.conf index 1d92ff1..a594ac2 100755 --- a/stow/.config/hypr/hyprland.conf +++ b/stow/.config/hypr/hyprland.conf @@ -17,9 +17,12 @@ monitor=eDP-1,1920x1080@60,auto,1 # exec-once = nm-applet & # exec-once = waybar & hyprpaper & firefox exec-once = swww-daemon & -exec-once = ulauncher --hide-window & exec-once = waybar & exec-once = swaync & +exec-once = ulauncher --hide-window & + +exec-once = systemctl status --user polkit-gnome-authentication-agent-1.service + exec-once = steam -silent & ############################# @@ -267,5 +270,12 @@ windowrulev2 = move 72% 6%, initialTitle:(^Picture-in-Picture$), initialClass:(^ windowrulev2 = move -100% -100%, initialClass:(^xwaylandvideobridge$) windowrulev2 = noinitialfocus, initialClass:(^xwaylandvideobridge$) +windowrulev2 = dimaround, initialClass:(^polkit-gnome-authentication-agent-1$) +windowrulev2 = center, initialClass:(^polkit-gnome-authentication-agent-1$) +windowrulev2 = float, initialClass:(^polkit-gnome-authentication-agent-1$) +windowrulev2 = pin, initialClass:(^polkit-gnome-authentication-agent-1$) +windowrulev2 = stayfocused, initialClass:(^polkit-gnome-authentication-agent-1$) +windowrulev2 = animation slidein, initialClass:(^polkit-gnome-authentication-agent-1$) + # layer rules layerrule = animation slide top, waybar