mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 11:36:16 +01:00
9662d253da
Signed-off-by: magic_rb <magic_rb@redalder.org>
29 lines
819 B
Nix
29 lines
819 B
Nix
{config, ...}: {
|
|
programs.ssh = {
|
|
enable = true;
|
|
|
|
controlMaster = "auto";
|
|
controlPath = "~/.ssh/controlmasters/%r@%h:%p";
|
|
controlPersist = "300s";
|
|
serverAliveInterval = 30;
|
|
matchBlocks = {
|
|
"Host *.your-storagebox.de".extraOptions = {
|
|
Port = toString 23;
|
|
};
|
|
"Host !git.redalder.org !gitea.redalder.org *redalder.org 10.64.1.* 10.64.0.*".extraOptions = {
|
|
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)
|
|
'';
|
|
}
|