nix: move ssh to home-manager
Anirudh Oppiliappan x@icyphox.sh
Fri, 05 Jan 2024 10:06:09 +0200
2 files changed,
45 insertions(+),
0 deletions(-)
M
nix/programs/common.nix
→
nix/programs/common.nix
@@ -12,6 +12,7 @@ ./tmux.nix
./readline.nix ./neovim.nix ./bash.nix + ./ssh.nix ]; programs = {
A
nix/programs/ssh.nix
@@ -0,0 +1,44 @@
+{ config +, pkgs +, ... +}: + +{ + programs.ssh = { + enable = true; + matchBlocks = { + "*" = { + serverAliveInterval = 180; + serverAliveCountMax = 3; + }; + "github.com" = { + user = "git"; + hostname = "github.com"; + identityFile = [ "~/.ssh/id_ed25519" "~/.ssh/upcloud" ]; + }; + "fern" = { + user = "ubuntu"; + hostname = "fern"; + identityFile = "~/.ssh/id_rsa"; + }; + "egg" = { + user = "icy"; + hostname = "egg"; + identityFile = [ "~/.ssh/id_ed25519" "~/.ssh/upcloud" ]; + }; + "upcloud" = { + hostname = "git.services.upcloud.com"; + identityFile = "~/.ssh/upcloud"; + }; + "denna" = { + hostname = "denna"; + identityFile = [ "~/.ssh/id_ed25519" "~/.ssh/upcloud" ]; + }; + "jade" = { + user = "ubuntu"; + hostname = "jade"; + identityFile = "~/.ssh/id_rsa"; + }; + }; + }; +}