mirror of
https://github.com/nmasur/dotfiles
synced 2025-03-14 16:57:06 +00:00
28 lines
431 B
Nix
28 lines
431 B
Nix
# SSHD settings for AWS machines
|
|
|
|
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.nmasur.presets.services.openssh-aws;
|
|
in
|
|
{
|
|
|
|
options.nmasur.presets.services.openssh-aws = {
|
|
enable = lib.mkEnableOption "OpenSSH on AWS VMs";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.openssh = {
|
|
settings = {
|
|
# AWS settings require this
|
|
PermitRootLogin = lib.mkForce "prohibit-password";
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|