nixos/home/ssh/default.nix
Evie Litherland-Smith 23f74093d8 Rewrite to simplify some home-manager setup
Remove work.nix variants of expressions
Better use of defaults across all machines

Set TERM env to xterm-256color for ssh connections by default
2023-08-07 10:00:57 +01:00

35 lines
767 B
Nix

{ pkgs, lib, ... }: {
home.packages = with pkgs; [ sshfs ];
programs.ssh = {
enable = true;
forwardAgent = true;
serverAliveInterval = 15;
serverAliveCountMax = 3;
controlMaster = "auto";
controlPersist = "10s";
extraConfig = ''
AddKeysToAgent=yes
SetEnv TERM=xterm-256color
'';
matchBlocks = {
"vanguard" = {
user = "xenia";
hostname = "192.168.1.166";
};
"legion" = {
user = "xenia";
hostname = "192.168.1.230";
};
"ionos" = {
user = "root";
hostname = "77.68.67.133";
};
"git.xenia.me.uk" = lib.hm.dag.entryBefore [ "git*" ] {
user = "gitea";
port = 2222;
};
"git*".user = "git";
};
};
}