From ccc0eda517582d83b8e44d201854f878068616d8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 15 Jan 2025 13:19:49 +0100 Subject: [PATCH] feat: github ssh support Signed-off-by: Harald Hoyer --- homes/aarch64-darwin/harald@m4/default.nix | 12 ++++++------ modules/darwin/security/gpg/default.nix | 9 ++++++--- systems/aarch64-darwin/m4/default.nix | 3 ++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/homes/aarch64-darwin/harald@m4/default.nix b/homes/aarch64-darwin/harald@m4/default.nix index 0493ac6..16c4749 100644 --- a/homes/aarch64-darwin/harald@m4/default.nix +++ b/homes/aarch64-darwin/harald@m4/default.nix @@ -11,11 +11,11 @@ stateVersion = "23.11"; # Please read the comment before changing. }; - programs.ssh.extraConfig = '' - #UseKeychain yes - #AddKeysToAgent yes - IdentityFile ~/.ssh/id_ed25519 - ''; +# programs.ssh.extraConfig = '' +# #UseKeychain yes +# #AddKeysToAgent yes +# IdentityFile ~/.ssh/id_ed25519 +# ''; metacfg = { cli-apps = { @@ -29,7 +29,7 @@ tools = { #direnv.enable = true; - ssh.enable = true; + # ssh.enable = true; git.enable = true; }; }; diff --git a/modules/darwin/security/gpg/default.nix b/modules/darwin/security/gpg/default.nix index ea9a5e8..fd86177 100644 --- a/modules/darwin/security/gpg/default.nix +++ b/modules/darwin/security/gpg/default.nix @@ -14,7 +14,7 @@ let gpgConf = "${inputs.gpg-base-conf}/gpg.conf"; gpgAgentConf = '' - enable-ssh-support + # enable-ssh-support default-cache-ttl 60 max-cache-ttl 120 ''; @@ -31,7 +31,10 @@ in environment.shellInit = '' export GPG_TTY="$(tty)" - export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket) + #export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket) + if test -z "$SSH_AGENT_PID"; then + eval $(ssh-agent -s) + fi ${pkgs.coreutils}/bin/timeout ${builtins.toString cfg.agentTimeout} ${pkgs.gnupg}/bin/gpgconf --launch gpg-agent gpg_agent_timeout_status=$? @@ -45,7 +48,7 @@ in programs.gnupg.agent = { enable = true; - enableSSHSupport = true; + enableSSHSupport = false; }; metacfg.home.file = { diff --git a/systems/aarch64-darwin/m4/default.nix b/systems/aarch64-darwin/m4/default.nix index cdf50a6..236497c 100644 --- a/systems/aarch64-darwin/m4/default.nix +++ b/systems/aarch64-darwin/m4/default.nix @@ -29,7 +29,7 @@ with lib.metacfg; }; environment.systemPackages = with pkgs; [ - iterm2 + # iterm2 # azure-cli kubectl kubectx @@ -37,6 +37,7 @@ with lib.metacfg; attic-client ollama imagemagick + gh ]; users.users.harald.shell = pkgs.fish;