add ssh config

This commit is contained in:
2025-12-15 04:01:22 +03:00
parent e8f7204598
commit 9ec7a410f1
2 changed files with 42 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
{ config, lib, pkgs, ... }:
{
programs.ssh = {
enable = true;
matchBlocks = {
"kr0sh.ru" = {
host = "kr0sh.ru";
user = "krosh";
identityFile = [ "~/.ssh/id" ];
};
"github.com" = {
host = "github.com";
user = "git";
identityFile = [ "~/.ssh/id" ];
};
"polus" = {
host = "polus";
hostname = "polus.hpc.cs.msu.ru";
user = "edu-cmc-skpod25-321-05";
identityFile = [ "~/.ssh/edu-cmc-skpod25-321-05.ppk" ];
};
"all" = lib.hm.dag.entryAfter [ "kr0sh.ru" "github.com" "polus" ] {
host = "*";
identityFile = [
# "~/.ssh/id_ed25519_sk"
"~/.ssh/gitlab.ppk"
"~/.ssh/id_rsa.ppk"
"~/.ssh/edu-cmc-skpod25-321-05.ppk"
"~/.ssh/id"
];
};
};
};
# services.ssh-agent.enable = true;
}