From d5c9a3717f6a6e2795c8d8fad5a8b09b2f0e8df6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 20 Feb 2021 15:25:55 +0000 Subject: [PATCH] home: add ssh --- home/default.nix | 1 + home/ssh.nix | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 home/ssh.nix 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 + ''; + }; +}