2024-03-02 22:05:30 +01:00
|
|
|
{config, ...}: {
|
2023-06-11 23:09:59 +02:00
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
controlMaster = "auto";
|
|
|
|
controlPath = "~/.ssh/controlmasters/%r@%h:%p";
|
|
|
|
controlPersist = "300s";
|
|
|
|
serverAliveInterval = 30;
|
|
|
|
matchBlocks = {
|
2024-10-27 11:59:49 +01:00
|
|
|
"Host *.your-storagebox.de".extraOptions = {
|
|
|
|
Port = toString 23;
|
|
|
|
};
|
2024-08-17 20:56:33 +02:00
|
|
|
"Host !git.redalder.org !gitea.redalder.org *redalder.org 10.64.1.* 10.64.0.*".extraOptions = {
|
2023-06-11 23:09:59 +02:00
|
|
|
ExitOnForwardFailure = "yes";
|
|
|
|
SendEnv = "INSIDE_EMACS";
|
|
|
|
RemoteForward = "/home/main/.ssh/emacs-server /run/user/1000/emacs/server";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home.activation."ssh-controlmasters" = config.lib.dag.entryAfter ["writeBoundary"] ''
|
|
|
|
mkdir -p ~/.ssh/controlmasters
|
|
|
|
'';
|
|
|
|
|
|
|
|
home.file.".profile".text = ''
|
|
|
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
|
|
'';
|
|
|
|
}
|