summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-11-16 19:42:30 +0100
committersils <sils@sils.li>2023-11-16 19:42:30 +0100
commit8a62f248c37e338034d1a5a134f00033484d14bb (patch)
tree0d2c97558163a7a9df98fea19412d588e7bf08fa
parentfeat(u/sils/gpg): remove ampersand from keygrip (diff)
downloadnix-config-8a62f248c37e338034d1a5a134f00033484d14bb.tar.gz
nix-config-8a62f248c37e338034d1a5a134f00033484d14bb.zip
feat(u/sils/gpg): add silent zsh init with gpg-agent
-rw-r--r--users/sils/gpg/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/users/sils/gpg/default.nix b/users/sils/gpg/default.nix
index 49339c5..2c166d0 100644
--- a/users/sils/gpg/default.nix
+++ b/users/sils/gpg/default.nix
@@ -1,4 +1,8 @@
-{config, ...}: {
+{
+  config,
+  lib,
+  ...
+}: {
   programs.gpg = {
     enable = true;
     homedir = "${config.xdg.dataHome}/gnupg";
@@ -9,4 +13,8 @@
     enableSshSupport = true;
     sshKeys = ["4077454831C98FE4BE4A9C167186C5A63615B790"];
   };
+  programs.zsh.initExtraFirst = lib.mkBefore ''
+    current_tty="$(tty)"
+    tty() { echo "$current_tty"; }
+  '';
 }