dotfiles/nixos/ssh.nix

42 lines
922 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
{
services.avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
domain = true;
workstation = true;
userServices = true;
addresses = true;
hinfo = true;
};
extraServiceFiles = {
ssh = "''${pkgs.avahi}/etc/avahi/services/ssh.service";
};
};
2023-08-07 13:33:41 -06:00
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
2023-09-10 17:13:13 -06:00
X11Forwarding = true;
};
2023-08-07 13:33:41 -06:00
};
programs.ssh = {
2023-09-10 17:13:13 -06:00
forwardX11 = true;
setXAuthLocation = true;
knownHosts = {
github = {
hostNames = ["github.com"];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
};
gitlab = {
hostNames = ["gitlab.com"];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf";
};
};
};
}