Files
Chickadee/modules/ssh.nix
T

29 lines
715 B
Nix
Raw Normal View History

2026-07-11 14:56:13 -04:00
{ config, lib, pkgs, ... }:
{
networking.firewall = {
enable = true;
2026-09-21 10:58:46 -04:00
interfaces.wg0.allowedTCPPorts = [ 22 ];
2026-07-11 14:56:13 -04:00
};
2026-09-21 10:58:46 -04:00
2026-07-11 14:56:13 -04:00
services.openssh = {
enable = true;
2026-09-21 10:58:46 -04:00
settings = {
2026-07-11 14:56:13 -04:00
PermitRootLogin = "prohibit-password";
2026-09-21 10:58:46 -04:00
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
listenAddresses = [{
2026-08-03 13:22:28 -04:00
addr = "0.0.0.0";
2026-09-21 10:58:46 -04:00
port = 22;
}];
2026-07-11 14:56:13 -04:00
};
2026-07-12 08:20:56 -04:00
2026-08-03 13:22:28 -04:00
users.users.lilac.openssh.authorizedKeys.keys = [
2026-09-12 17:11:21 -04:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6kdpZqaqtyfGVNRxpA24sw37MGpXV/NUaALTEt98EK lilac@laptop"
2026-08-03 13:22:28 -04:00
];
2026-07-11 14:56:13 -04:00
users.users.root.openssh.authorizedKeys.keys = [
2026-09-12 17:11:21 -04:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6kdpZqaqtyfGVNRxpA24sw37MGpXV/NUaALTEt98EK lilac@laptop"
2026-07-11 14:56:13 -04:00
];
}