diff --git a/home/default.nix b/home/default.nix index c29a07c..48a1a7d 100644 --- a/home/default.nix +++ b/home/default.nix @@ -9,6 +9,7 @@ ./packages.nix ./pager.nix ./secrets # Home-manager specific secrets + ./ssh.nix ./tmux.nix ./zsh ]; diff --git a/home/ssh.nix b/home/ssh.nix new file mode 100644 index 0000000..b928a73 --- /dev/null +++ b/home/ssh.nix @@ -0,0 +1,36 @@ +{ ... }: +{ + programs.ssh = { + enable = true; + + matchBlocks = { + "github.com" = { + hostname = "github.com"; + identityFile = "~/.ssh/shared_rsa"; + user = "git"; + }; + + "gitlab.com" = { + hostname = "gitlab.com"; + identityFile = "~/.ssh/shared_rsa"; + user = "git"; + }; + + "git.sr.ht" = { + hostname = "git.sr.ht"; + identityFile = "~/.ssh/shared_rsa"; + user = "git"; + }; + + porthos = { + hostname = "91.121.177.163"; + identityFile = "~/.ssh/shared_rsa"; + user = "ambroisie"; + }; + }; + + extraConfig = '' + AddKeysToAgent yes + ''; + }; +}