Files
dotfiles/home-modules/ssh.nix
Lennart J. Kurzweg (Nx2) 042e8c7ee7 further gpg-ssh edits
2025-10-07 16:35:42 +00:00

32 lines
911 B
Nix

{ pkgs, ... }@all: with all; {
home.packages = with pkgs; [ sshfs ];
programs.ssh = {
enable = true;
package = pkgs.openssh;
addKeysToAgent = "yes";
matchBlocks = let
nxace = name: {
host = name;
hostname = "ssh.${hyper.domain}";
user = hyper.user;
port = 50022;
identityFile = "${hyper.home}/vault/ssh/nxace-nx2-${hyper.host}";
};
in {
"nxace" = nxace "nxace";
"nxacel" = (nxace "nxacel") // { hostname = "10.0.1.1"; };
"nxrpli" = (nxace "nxrpil") // { hostname = "10.0.1.31"; port = 22; };
"nxgit" = (nxace "nxgit") // {
user = "git";
identityFile = "${hyper.home}/vault/ssh/nxgit-nx2-${hyper.host}";
# addKeysToAgent = "1h";
};
};
};
services.ssh-agent = {
enable = true;
# socket = "ssh-agent"; # suffix to $XDG_RUNTIME_DIR
# package = pkgs.openssh;
};
}