From 3ffbf3096eea40d8e4f2cf9967e46f04abb5e82a Mon Sep 17 00:00:00 2001 From: Christian Ott Date: Sun, 23 Jun 2024 10:29:19 +0200 Subject: [PATCH] fix 1password system auth => needs to be in nixos --- configuration.nix | 15 +++++++++++++++ home.nix | 2 -- hyperland/default.nix | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index 745bacc..e226ff2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -157,6 +157,21 @@ networkmanager-openvpn ]; + + # https://github.com/nix-community/home-manager/issues/3997 + # could not get the workaround with overlay to work in hm + programs._1password = { + enable = true; + }; + programs._1password-gui = { + enable = true; + polkitPolicyOwners = ["chrigi"]; + }; + + security.polkit.enable = true; + services.gnome.gnome-keyring.enable = true; + security.pam.services.greetd.enableGnomeKeyring = true; + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/home.nix b/home.nix index 4392e76..85c32a4 100644 --- a/home.nix +++ b/home.nix @@ -21,8 +21,6 @@ eza obsidian jq - _1password - _1password-gui skypeforlinux ]; diff --git a/hyperland/default.nix b/hyperland/default.nix index 5852b92..914e10d 100644 --- a/hyperland/default.nix +++ b/hyperland/default.nix @@ -123,6 +123,8 @@ in "dunst" "waybar" "${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable --indicator" + "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" + ]; bind = @@ -133,6 +135,7 @@ in "$mod, l, exec, hyprlock" # Add a keybinding to lock the screen "$mod, C, exec, codium" "$mod, E, exec, hyprctl dispatch exit" + "$mod, code:51, exec, 1password" # super + \ ",XF86MonBrightnessDown, exec, brightnessctl s 5%-" ",XF86MonBrightnessUp, exec, brightnessctl s +5%" ] @@ -152,6 +155,19 @@ in ) 10) ); + windowrulev2= [ + # https://jbmorley.co.uk/posts/2024-02-13-1password-and-hyprland/ + "float, title:(1Password)" + "size 70% 70%, title:(1Password)" + "center, title:(1Password)" + + + "float,class:(org.kde.polkit-kde-authentication-agent-1)" + "opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$" + "bordercolor rgba(ed8796FF), class:org.kde.polkit-kde-authentication-agent-1" + "dimaround, class:org.kde.polkit-kde-authentication-agent-1" + "stayfocused, class:org.kde.polkit-kde-authentication-agent-1" + ]; # Bind flags # l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active. # r -> release, will trigger on release of a key.