Added SSH-Config

This commit is contained in:
kB01 2025-11-07 01:35:56 +01:00
parent 07434754ba
commit 5c7f669921
No known key found for this signature in database
2 changed files with 103 additions and 1 deletions

View file

@ -1,6 +1,8 @@
{ config, pkgs, lib, inputs, ... }:
{
#imports = [];
imports = [
./ssh.nix
];
home.username = "kb";
home.homeDirectory = "/home/kb";

View file

@ -0,0 +1,100 @@
{ config, pkgs, lib, inputs, ... }:
{
# SSH Configuration
services.ssh-agent.enable = true;
programs.ssh.enable = true;
programs.ssh.extraConfig = ''
IdentitiesOnly=yes
'';
# SSH Shell Connections
programs.ssh.matchBlocks."master@pkpnafs-m1ni" = {
host = "pkpnafs";
hostname = "pkpnafs.kb-one.de";
user = "master";
identityFile = "~/.ssh/id_ed25519_sk_rk_kb-ssh@m1ni";
port = 3422;
};
programs.ssh.matchBlocks."master@senfnvp-m1ni" = {
host = "senfnvp";
hostname = "senfnvp.kb-one.de";
user = "master";
identityFile = "~/.ssh/id_ed25519_sk_rk_kb-ssh@m1ni";
port = 9553;
};
programs.ssh.matchBlocks."master@mow0m-m1ni" = {
host = "mow0m";
hostname = "mow0m";
user = "master";
identityFile = "~/.ssh/id_ed25519_sk_rk_kb-ssh@m1ni";
port = 9553;
};
programs.ssh.matchBlocks."master@web-m1ni" = {
host = "web";
hostname = "kb-one.de";
user = "master";
identityFile = "~/.ssh/id_ed25519_sk_rk_kb-ssh@m1ni";
port = 2222;
};
programs.ssh.matchBlocks."kb@Rubtrm" = {
host = "Rubtrm";
hostname = "Rubtrm";
user = "kb";
identityFile = "~/.ssh/kb@Rubtrm";
port = 2524;
};
# SSH Git Connections
programs.ssh.matchBlocks."kb01@kb-one-git" = {
host = "git.kb-one.de";
user = "git";
identityFile = "~/.ssh/id_ed25519_sk_rk_kb-git@m1ni";
port = 9522;
};
programs.ssh.matchBlocks."kb01@0x90-git" = {
host = "git.0x90.space";
user = "git";
identityFile = "~/.ssh/kb01-git-0x90";
};
# SSH Remoteunlock Connections
programs.ssh.matchBlocks."remoteunlock@mow0m" = {
host = "remoteunlock-mow0m";
hostname = "mow0m";
user = "root";
identityFile = "~/.ssh/remoteunlock-mow0m";
port = 2550;
};
# Nix Build Hosts
programs.ssh.matchBlocks."nix-builder@pkpnafs" = {
host = "pkpnafs";
hostname = "pkpnafs.kb-one.de";
user = "nix-builder";
identityFile = "~/.ssh/nix-builder@pkpnafs";
port = 3422;
};
programs.ssh.matchBlocks."nix-builder@senfnvp" = {
host = "senfnvp";
hostname = "senfnvp.kb-one.de";
user = "nix-builder";
identityFile = "~/.ssh/nix-builder@senfnvp";
port = 9553;
};
# Nix Caches
programs.ssh.matchBlocks."nix-ssh@pkpnafs" = {
host = "pkpnafs";
hostname = "pkpnafs.kb-one.de";
user = "nix-ssh";
identityFile = "~/.ssh/nix-ssh@pkpnafs";
port = 3422;
};
programs.ssh.matchBlocks."nix-ssh@senfnvp" = {
host = "senfnvp";
hostname = "senfnvp.kb-one.de";
user = "nix-ssh";
identityFile = "~/.ssh/nix-ssh@senfnvp";
port = 9553;
};
}