mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
16 lines
423 B
Nix
16 lines
423 B
Nix
{ config, lib, ... }:
|
|
{
|
|
options.custom.services.forgejo.ssh.enable = lib.mkEnableOption "";
|
|
|
|
config = lib.mkIf config.custom.services.forgejo.ssh.enable {
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
KbdInteractiveAuthentication = false;
|
|
PermitRootLogin = "no";
|
|
AllowUsers = [ config.users.users.forgejo.name ];
|
|
};
|
|
};
|
|
};
|
|
}
|