aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimen A. W. Olsen <hello@simenandre.no>2026-08-30 10:51:16 +0200
committerSimen A. W. Olsen <hello@simenandre.no>2026-08-30 10:51:16 +0200
commit4f8c735bc7e86c1c3cd692c7120a61f0e04af161 (patch)
tree6560e861ad64a68b507e987167e7e5af9725ff95
parent6fa680fb02e6f5f67af58e63a8c8e2a22b29b081 (diff)
downloaddotfiles-4f8c735bc7e86c1c3cd692c7120a61f0e04af161.tar.gz
dotfiles-4f8c735bc7e86c1c3cd692c7120a61f0e04af161.zip
feat(home): limit 1Password SSH agent to Default and jp-gitlab keys
-rw-r--r--modules/home/default.nix1
-rw-r--r--modules/home/onepassword.nix15
2 files changed, 16 insertions, 0 deletions
diff --git a/modules/home/default.nix b/modules/home/default.nix
index 918f0c0..baa366e 100644
--- a/modules/home/default.nix
+++ b/modules/home/default.nix
@@ -6,6 +6,7 @@
./git.nix
./ghostty.nix
./herdr.nix
+ ./onepassword.nix
./starship.nix
./tmux.nix
./lazygit.nix
diff --git a/modules/home/onepassword.nix b/modules/home/onepassword.nix
new file mode 100644
index 0000000..a9ce718
--- /dev/null
+++ b/modules/home/onepassword.nix
@@ -0,0 +1,15 @@
+{ ... }:
+
+{
+ # Limits which keys the 1Password SSH agent offers. Without this file the
+ # agent exposes every SSH key in every vault, and servers drop the connection
+ # after ~6 failed offers before reaching the right one. Order is the order
+ # the agent offers them in, so the default key goes first.
+ home.file.".config/1Password/ssh/agent.toml".text = ''
+ [[ssh-keys]]
+ item = "Default"
+
+ [[ssh-keys]]
+ item = "jp-gitlab"
+ '';
+}