From a89f7f75763dfa671854c8d03b53a97bb2f4356c Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Thu, 4 Apr 2024 22:41:11 +0200 Subject: [PATCH] Add ssh --- home/programs/terminal/tools/default.nix | 1 + home/programs/terminal/tools/ssh.nix | 28 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 home/programs/terminal/tools/ssh.nix diff --git a/home/programs/terminal/tools/default.nix b/home/programs/terminal/tools/default.nix index 3bb029b..6ff0b16 100644 --- a/home/programs/terminal/tools/default.nix +++ b/home/programs/terminal/tools/default.nix @@ -4,5 +4,6 @@ _: { ./gpg.nix ./eza.nix ./man.nix + ./ssh.nix ]; } diff --git a/home/programs/terminal/tools/ssh.nix b/home/programs/terminal/tools/ssh.nix new file mode 100644 index 0000000..2946298 --- /dev/null +++ b/home/programs/terminal/tools/ssh.nix @@ -0,0 +1,28 @@ +{ + programs = { + ssh = { + enable = true; + hashKnownHosts = true; + compression = true; + matchBlocks = { + # Git hosts + "aur" = { + hostname = "aur.archlinux.org"; + identityFile = "~/.ssh/git/aur"; + }; + "gitlab" = { + user = "git"; + hostname = "gitlab.com"; + identityFile = "~/.ssh/git/gitlab"; + }; + "github" = { + user = "git"; + hostname = "gitlab.com"; + identityFile = "~/.ssh/git/github"; + }; + # TODO: Figure out how to add protected/encrypted blocks here + # I don't like the idea of expising IPs/hostnames in the config + }; + }; + }; +}