diff --git a/flake.nix b/flake.nix index 130c413..6f927eb 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ ./modules/nvim.nix ./modules/tmux.nix ./modules/zsh.nix + ./modules/ssh.nix ]; home.username = "yanlin"; diff --git a/modules/ssh.nix b/modules/ssh.nix new file mode 100644 index 0000000..1926d63 --- /dev/null +++ b/modules/ssh.nix @@ -0,0 +1,60 @@ +{ config, pkgs, ... }: + +{ + programs.ssh = { + enable = true; + + matchBlocks = { + "aicloud" = { + hostname = "aicloud"; + user = "hb05nk@cs.aau.dk"; + identityFile = "~/.ssh/keys/aicloud"; + proxyJump = "pi"; + }; + + "nas" = { + hostname = "nas.hw.yanlincs.com"; + user = "root"; + identityFile = "~/.ssh/keys/nas"; + }; + + "pi" = { + hostname = "pi.hw.yanlincs.com"; + user = "yanlin"; + identityFile = "~/.ssh/keys/pi"; + }; + + "cm" = { + hostname = "cm.hw.yanlincs.com"; + user = "yanlin"; + identityFile = "~/.ssh/keys/pi"; + }; + + "personal-vps" = { + hostname = "personal.vps.yanlincs.com"; + user = "root"; + identityFile = "~/.ssh/keys/hetzner"; + }; + + "zero" = { + hostname = "zero.hw.yanlincs.com"; + user = "yanlin"; + identityFile = "~/.ssh/keys/pi"; + }; + + "ucloud-a40" = { + hostname = "130.225.38.194"; + user = "ucloud"; + identityFile = "~/.ssh/keys/ucloud"; + proxyJump = "imac"; + }; + + "ucloud-h100" = { + hostname = "ssh.cloud.sdu.dk"; + user = "ucloud"; + port = 2281; + identityFile = "~/.ssh/keys/ucloud"; + }; + }; + }; +} \ No newline at end of file