add server

This commit is contained in:
kp2pml30 2025-01-26 19:33:07 +04:00
parent 284b131058
commit 95f65d9c03
18 changed files with 358 additions and 112 deletions

20
nix/server/ssh.nix Normal file
View file

@ -0,0 +1,20 @@
{ config
, pkgs
, lib
, ...
}:
let
cfg = config.kp2pml30.server;
in {
services.openssh = {
enable = true;
ports = [ 22 ];
openFirewall = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = lib.mkForce "no";
AllowUsers = [ cfg.username ];
};
};
}