From 4c01f10eeb4d2554c72ff7f6f26859daef5f6a55 Mon Sep 17 00:00:00 2001 From: reo101 Date: Thu, 13 Jul 2023 14:31:56 +0300 Subject: [PATCH] feat(limontozu): update Add a few more packages Setup GPG as SSH (TODO: abstract away in a module) --- .../limontozu/home/pavelatanasov.nix | 65 +++++++++++++++---- 1 file changed, 54 insertions(+), 11 deletions(-) diff --git a/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix b/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix index 03a5868..3aff4d7 100644 --- a/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix +++ b/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix @@ -20,8 +20,13 @@ yabai skhd + # Shell + btop + ripgrep + # Neovim neovim + fennel-language-server # Dhall dhall @@ -31,17 +36,30 @@ rnix-lsp nil + # SSH and GPG + openssh + gnupg + pinentry_mac + (pass.withExtensions (extensions: with extensions; [ + pass-otp + ])) + # FMI vim-fmi-cli # Zig zigpkgs.master inputs.zls-overlay.packages.x86_64-darwin.default + + # Polkadot + srtool-cli + pest-ide-tools ]; reo101 = { shell = { enable = true; + atuin = true; direnv = true; zoxide = true; }; @@ -61,17 +79,42 @@ programs.git = { enable = true; - userName = "pavelatanasov"; - userEmail = "pavel.atanasov@limechain.tech"; - # signing = { - # signByDefault = true; - # key = "0x52F3E1D376F692C0"; - # }; + userName = "reo101"; + # userEmail = "pavel.atanasov@limechain.tech"; + userEmail = "pavel.atanasov2001@gmail.com"; + signing = { + signByDefault = true; + key = "675AA7EF13964ACB"; + }; }; - # services.gpg-agent = { - # enable = true; - # defaultCacheTtl = 1800; - # enableSshSupport = true; - # }; + home.file.".gnupg/gpg-agent.conf" = { + text = '' + allow-preset-passphrase + max-cache-ttl 86400 + default-cache-ttl 86400 + enable-ssh-support + # pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac + # pinentry-program /usr/local/opt/pinentry-touchid/bin/pinentry-touchid + ''; + }; + + home.file.".gnupg/sshcontrol" = { + text ='' + CFDE97EDC2FDB2FD27020A084F1E3F40221BAFE7 + ''; + }; + + programs.zsh.initExtra = '' + # if [ "''${SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + # export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + # fi + # if [ -z "$SSH_AUTH_SOCK" ]; then + # export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket) + # fi + unset SSH_AGENT_PID + export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket) + gpg-connect-agent updatestartuptty /bye >/dev/null + export GPG_TTY=$(tty) + ''; }