- sudo (wheelNeedsPassword) → modules/core/core.nix (全局) - LXC SSH override (PermitRootLogin, PasswordAuth) → profiles/lxc.nix - modules/server/ssh.nix: use mkDefault so profiles can override - Delete modules/optional/lxc.nix - Clean up hosts/nixos-lxc/configuration.nix: remove redundant SSH/sudo/users (now handled by core + server + profile chain) - Update modules/optional/README.md
14 lines
311 B
Nix
14 lines
311 B
Nix
{ lib, ... }:
|
|
{
|
|
services.openssh = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
settings = {
|
|
PasswordAuthentication = lib.mkDefault false;
|
|
KbdInteractiveAuthentication = lib.mkDefault false;
|
|
PermitRootLogin = lib.mkDefault "no";
|
|
X11Forwarding = lib.mkDefault false;
|
|
};
|
|
};
|
|
}
|