# SPDX-FileCopyrightText: 2024 Maurice Debray # SPDX-FileCopyrightText: 2024 Tom Hubrecht # # SPDX-License-Identifier: EUPL-1.2 { config, lib, ... }: let inherit (lib) mkEnableOption mkIf; cfg = config.dgn-ssh; in { options.dgn-ssh = { enable = mkEnableOption "ssh default configuration." // { default = true; }; }; config = mkIf cfg.enable { services.openssh = { enable = true; settings = { KbdInteractiveAuthentication = false; LoginGraceTime = "30"; MaxSessions = "64"; MaxStartups = "64"; PasswordAuthentication = false; }; }; programs.mosh.enable = true; }; }