all repos — dotfiles @ 77c626816fe07cd99cd5b0c4c0448ea234cebc0c

my *nix dotfiles

nix: move ssh to home-manager
Anirudh Oppiliappan x@icyphox.sh
Fri, 05 Jan 2024 10:06:09 +0200
commit

77c626816fe07cd99cd5b0c4c0448ea234cebc0c

parent

2f59889b57d45a670f72057c3a4ef3a39321daf1

2 files changed, 45 insertions(+), 0 deletions(-)

jump to
M nix/programs/common.nixnix/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"; + }; + }; + }; +}