forgejo: Remove ssh server

This commit is contained in:
SebastianStork 2026-01-25 13:01:02 +01:00
parent 2eb791f791
commit 00d1e06c25
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
2 changed files with 0 additions and 29 deletions

View file

@ -1,29 +0,0 @@
{ config, lib, ... }:
let
cfg = config.custom.web-services.forgejo.ssh;
in
{
options.custom.web-services.forgejo.ssh = {
enable = lib.mkEnableOption "";
port = lib.mkOption {
type = lib.types.port;
default = 22;
};
};
config = lib.mkIf cfg.enable {
services.forgejo.settings.server.SSH_PORT = cfg.port;
services.openssh = {
enable = true;
ports = lib.mkForce [ cfg.port ];
authorizedKeysFiles = lib.mkForce [ "${config.services.forgejo.stateDir}/.ssh/authorized_keys" ];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
AllowUsers = [ config.services.forgejo.user ];
};
};
};
}