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
+1
View File
@@ -12,6 +12,7 @@
./modules/programs.nix ./modules/programs.nix
./modules/tmux.nix ./modules/tmux.nix
./modules/cursor.nix ./modules/cursor.nix
./modules/ssh.nix
] ++ lib.optional (builtins.getEnv "DISABLE_HYPR" != "1") ] ++ lib.optional (builtins.getEnv "DISABLE_HYPR" != "1")
./modules/hypr/hypr.nix ./modules/hypr/hypr.nix
++ lib.optional (builtins.pathExists ./modules/my.nix) ./modules/my.nix; ++ lib.optional (builtins.pathExists ./modules/my.nix) ./modules/my.nix;
+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;
}