mirror of
https://github.com/kp2pml30/dotfiles.git
synced 2026-04-14 22:31:46 +04:00
add server
This commit is contained in:
parent
284b131058
commit
95f65d9c03
18 changed files with 358 additions and 112 deletions
20
nix/server/ssh.nix
Normal file
20
nix/server/ssh.nix
Normal 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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue