From 32198de64069bdb4276f32ba98ade7af880a4c7e Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 29 Jun 2025 21:43:59 +1000 Subject: [PATCH 1/4] applications: install 1password properly on linux systems use the option instead of the package. allows the use of system authentication to unlock 1password. --- flake.nix | 1 + modules/applications/1password.nix | 9 +++++++++ modules/applications/default.nix | 2 -- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 modules/applications/1password.nix diff --git a/flake.nix b/flake.nix index b9c10f2..eb11477 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,7 @@ ./modules/browser/chromium.nix ./modules/applications/default.nix ./modules/games/linux.nix + ./modules/applications/1password.nix ./modules/nix/linux.nix ./modules/shell.nix diff --git a/modules/applications/1password.nix b/modules/applications/1password.nix new file mode 100644 index 0000000..3eccff3 --- /dev/null +++ b/modules/applications/1password.nix @@ -0,0 +1,9 @@ +{ config, ...}: + +{ + programs._1password.enable = true; + programs._1password-gui = { + enable = true; + polkitPolicyOwners = [ "nico" ]; + }; +} diff --git a/modules/applications/default.nix b/modules/applications/default.nix index 22b19f0..9679b57 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -7,7 +7,6 @@ obsidian ani-cli vesktop - _1password-cli yt-dlp ] ++ lib.optionals pkgs.stdenv.isLinux (with pkgs; [ mpv @@ -18,7 +17,6 @@ obs-studio blender gimp3 - _1password-gui signal-desktop-bin ]) ++ lib.optionals pkgs.stdenv.isDarwin (with pkgs; [ iina From 7f11075af65008e09699142b9404a9243390c148 Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 29 Jun 2025 22:00:55 +1000 Subject: [PATCH 2/4] hypr: set window rules for 1Password prompts windows like SSH confirmation and quick access are given a more "system" appearance like polkit. --- stow/.config/hypr/hyprland.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stow/.config/hypr/hyprland.conf b/stow/.config/hypr/hyprland.conf index bad31d8..57fbc43 100755 --- a/stow/.config/hypr/hyprland.conf +++ b/stow/.config/hypr/hyprland.conf @@ -292,5 +292,10 @@ windowrulev2 = noblur, initialTitle:(^Steam Input On-screen Keyboard$) windowrulev2 = bordersize 0, initialTitle:(^Steam Input On-screen Keyboard$) windowrulev2 = noshadow, initialTitle:(^Steam Input On-screen Keyboard$) +windowrulev2 = center, initialClass:(^1Password$),floating:1 +windowrulev2 = persistentsize, initialClass:(^1Password$),floating:1 +windowrulev2 = dimaround, initialClass:(^1Password$),floating:1 +windowrulev2 = animation popin, initialClass:(^1Password$),floating:1 + # layer rules layerrule = animation slide right, waybar From 6dbaa5931e84b1179452365933086cafdf3b9461 Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 29 Jun 2025 22:03:35 +1000 Subject: [PATCH 3/4] hypr: change animation for polkit window --- stow/.config/hypr/hyprland.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stow/.config/hypr/hyprland.conf b/stow/.config/hypr/hyprland.conf index 57fbc43..cc63535 100755 --- a/stow/.config/hypr/hyprland.conf +++ b/stow/.config/hypr/hyprland.conf @@ -276,7 +276,7 @@ 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$) +windowrulev2 = animation gnomed, initialClass:(^polkit-gnome-authentication-agent-1$) windowrulev2 = dimaround, initialClass:(^opensnitch_ui$) windowrulev2 = stayfocused, initialClass:(^opensnitch_ui$) From 5618b31e9f69c8ce611a0501cc72da5b1b2817e8 Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 29 Jun 2025 22:05:24 +1000 Subject: [PATCH 4/4] hypr: lock 1password when using hyprlock --- stow/.config/hypr/hyprlock.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/stow/.config/hypr/hyprlock.sh b/stow/.config/hypr/hyprlock.sh index 0ea0c07..1250274 100755 --- a/stow/.config/hypr/hyprlock.sh +++ b/stow/.config/hypr/hyprlock.sh @@ -5,5 +5,6 @@ IMAGE="$(swww query | rev | cut -f1 -d' ' | rev)" cp "$IMAGE" /tmp/hyprlock-background +1password --lock hyprlock