nix-dotfiles/modules/security.nix

27 lines
560 B
Nix
Raw Normal View History

2023-12-29 20:54:12 +01:00
# BIASED
2023-12-29 14:53:19 +01:00
{ config, lib, ... }:
{
config = {
services = lib.mkIf config.services.gitea.enable {
openssh = {
extraConfig = ''
Match User gitea
AllowAgentForwarding no
AllowTcpForwarding no
PermitTTY no
X11Forwarding no
'';
};
gitea.settings."ssh.minimum_key_sizes" = {
ECDSA = -1;
RSA = 4095;
};
};
networking.firewall = lib.mkIf config.services.openssh.enable {
allowedTCPPorts = config.services.openssh.ports;
};
2023-12-29 14:53:19 +01:00
};
}