nix-dotfiles/modules/security.nix
Dennis 4c1e86907a dennis the formatter (#75)
* dennis the formatter

* changed comment

* fixup
2024-02-05 22:45:43 +01:00

29 lines
671 B
Nix

# BIASED
{ config, lib, ... }: {
config = {
services = {
openssh = lib.mkIf config.services.gitea.enable {
extraConfig = ''
Match User gitea
PermitTTY no
X11Forwarding no
'';
};
gitea.settings."ssh.minimum_key_sizes" = lib.mkIf config.services.gitea.enable {
ECDSA = -1;
RSA = 4095;
};
endlessh-go = lib.mkIf (!builtins.elem 22 config.services.openssh.ports) {
enable = true;
port = 22;
};
};
networking.firewall = lib.mkIf config.services.openssh.enable {
allowedTCPPorts = config.services.openssh.ports ++ [ 22 ];
};
};
}