From bf3b33b0eda0f6df9a0c1257ee4bb7f7ab2fa4a4 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Fri, 22 Dec 2023 20:22:40 +0100 Subject: [PATCH] Prefer IPv4 for SSH I wasn't able to push code to my selfhosted git instance over tailscale as it automatically preferred IPv6 which somehow wasn't reachable --- modules/shell/git.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/shell/git.nix b/modules/shell/git.nix index 1508c8a..4d19487 100644 --- a/modules/shell/git.nix +++ b/modules/shell/git.nix @@ -6,18 +6,17 @@ ... }: { home-manager.users.${vars.user} = { + #Prefer IPv4 for ssh + home.file.".ssh/config".text = "AddressFamily inet"; + programs.git = { enable = true; userName = "GHOSCHT"; userEmail = "31184695+GHOSCHT@users.noreply.github.com"; extraConfig = { - # Sign all commits using ssh key commit.gpgsign = true; user.signingkey = "0x2C2C1C62A5388E82"; - # gpg.format = "ssh"; - # gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; - # user.signingkey = "~/.ssh/git.pub"; init.defaultBranch = "main"; }; };