mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
forgejo: Remove ssh server
This commit is contained in:
parent
2eb791f791
commit
00d1e06c25
2 changed files with 0 additions and 29 deletions
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue