Files
nixos-config/home-manager/modules/ssh.nix
T
2025-12-15 04:01:22 +03:00

42 lines
890 B
Nix

{ 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;
}