From ffddb4773b0c8e4f41e84f6b605f7518efa0e9f3 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Tue, 7 Oct 2025 17:31:27 +0200 Subject: [PATCH] ssh-agent + port fix --- home-modules/ssh.nix | 45 +++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/home-modules/ssh.nix b/home-modules/ssh.nix index c0b99f4..9d53f31 100644 --- a/home-modules/ssh.nix +++ b/home-modules/ssh.nix @@ -7,7 +7,7 @@ host = name; hostname = "ssh.${hyper.domain}"; user = hyper.user; - port = secrets.ssh.port; + port = 50022; identityFile = "${hyper.home}/vault/ssh/nxace-nx2-${hyper.host}"; }; in { @@ -23,24 +23,31 @@ }; home.packages = with pkgs; [ sshfs ]; - services.gpg-agent = let - min2sec = min: (min * 60); - in { - enable = false; - verbose = true; - sshKeys = [ - "97081264F7FD72D890D496E839AA9A4C7892A7D8" # Keygrip (not Fingerprint!) of [A] Subkey - ]; - enableSshSupport = true; - enableFishIntegration = true; - defaultCacheTtlSsh = min2sec 60; - defaultCacheTtl = min2sec 30; - pinentry = { - package = pkgs.pinentry; - program = "pinentry"; + services = { + ssh-agent = { + enable = true; + # socket = "ssh-agent"; # suffix to $XDG_RUNTIME_DIR + # package = pkgs.openssh; + }; + gpg-agent = let + min2sec = min: (min * 60); + in { + enable = false; + verbose = true; + sshKeys = [ + "97081264F7FD72D890D496E839AA9A4C7892A7D8" # Keygrip (not Fingerprint!) of [A] Subkey + ]; + enableSshSupport = true; + enableFishIntegration = true; + defaultCacheTtlSsh = min2sec 60; + defaultCacheTtl = min2sec 30; + pinentry = { + package = pkgs.pinentry; + program = "pinentry"; + }; + extraConfig = '' + allow-loopback-pinentry + ''; }; - extraConfig = '' - allow-loopback-pinentry - ''; }; }