Changed option namespace for better compatibility

This commit is contained in:
pazpi 2024-08-27 17:49:31 +02:00
parent fe8045ee55
commit 8b25f46384
26 changed files with 407 additions and 232 deletions

21
modules/systems/ssh.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, lib, ... }:
let
cfg = config.my.systems.ssh;
in
{
options.my.systems.ssh = {
enable = lib.mkEnableOption "Enable SSH Server";
};
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
# require public key authentication for better security
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = false;
};
};
}