Files
Chickadee/modules/ssh.nix
T
2026-09-12 17:11:21 -04:00

28 lines
690 B
Nix

{ config, lib, pkgs, ... }:
{
networking.firewall = {
enable = true;
interfaces.wg0.allowedTCPPorts = [ 22 ];
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
listenAddresses = [{
addr = "0.0.0.0";
port = 22;
}];
};
users.users.lilac.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6kdpZqaqtyfGVNRxpA24sw37MGpXV/NUaALTEt98EK lilac@laptop"
];
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6kdpZqaqtyfGVNRxpA24sw37MGpXV/NUaALTEt98EK lilac@laptop"
];
}