From f56ab9af666782d7f14bbbe067b0fa28a5920b6f Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sat, 6 May 2023 21:15:02 +0200 Subject: [PATCH] Further testing required to use a variable for the identity file path --- nixos-config/home-manager.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/nixos-config/home-manager.nix b/nixos-config/home-manager.nix index 3ee1e362..0c5b9318 100644 --- a/nixos-config/home-manager.nix +++ b/nixos-config/home-manager.nix @@ -103,27 +103,23 @@ in { }; ssh = { enable = true; - extraOptionOverrides = { - AddKeysToAgent = "yes"; - test = "${builtins.getEnv "HOME"}"; - test2 = "${builtins.getEnv "XDG_RUNTIME_DIR"}"; - }; + extraOptionOverrides = { AddKeysToAgent = "yes"; }; matchBlocks = [ { host = "gitlab.com"; - identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ]; + identityFile = [ "/home/${user}/.ssh/id_ed25519_git" ]; } { host = "github.com"; - identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ]; + identityFile = [ "/home/${user}/.ssh/id_ed25519_git" ]; } { host = "gitea.exu.li"; - identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ]; + identityFile = [ "/home/${user}/.ssh/id_ed25519_git" ]; } { host = "aur.archlinux.org"; - identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ]; + identityFile = [ "/home/${user}/.ssh/id_ed25519_git" ]; } ]; };