mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
23 lines
354 B
Nix
23 lines
354 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib; {
|
|
options.elss.sshd.enable = mkEnableOption "Set up sshd";
|
|
|
|
config = let
|
|
cfg = config.elss.sshd;
|
|
in
|
|
mkIf cfg.enable {
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
PermitRootLogin = "no";
|
|
};
|
|
};
|
|
};
|
|
}
|