blob: 6f2def19dfeb63cdc033006e07cf0fa452ee236d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{
config,
lib,
...
}:
let
sshPort = 2222;
wheelUsers =
with config.users;
with builtins;
filter (u: elem "wheel" users.${u}.extraGroups) (attrNames users);
in
{
services.openssh = {
enable = lib.mkDefault true;
openFirewall = true;
startWhenNeeded = true;
ports = [ sshPort ];
settings = {
AllowUsers = wheelUsers;
PermitRootLogin = "no";
PasswordAuthentication = lib.mkDefault false;
};
};
}
|