Move SSH config to separate directory

This commit is contained in:
Weckyy702
2026-03-11 17:50:21 +01:00
parent 606d4ecaa6
commit 9bda8655f2
2 changed files with 33 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ top @ { config
inputs.spicetify-nix.homeManagerModules.default
./nixvim
./borgmatic.nix
./ssh.nix
];
home.username = username;
@@ -212,9 +213,5 @@ top @ { config
services.hyprpolkitagent.enable = true;
services.ssh-agent = {
enable = true;
enableZshIntegration = true;
};
home.stateVersion = "25.11";
}

32
home/ssh.nix Normal file
View File

@@ -0,0 +1,32 @@
{ ... }: {
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"veltko.de" = {
user = "weckyy702";
port = 47213;
};
"duke.veltnet" = {
user = "konstantin";
};
#TODO: beastie
};
};
services.ssh-agent = {
enable = true;
enableZshIntegration = true;
};
}