{ config, lib, pkgs, ... }:

let cfg = config.sydnix.openssh;
in {
  options.sydnix.openssh = {
    enable = lib.mkEnableOption "OpenSSH server";
  };

  config = lib.mkIf cfg.enable {
    services.openssh = {
      enable = true;
      settings.PermitRootLogin = "yes";
      settings.X11Forwarding = true;
    };
  };
}
