2024-06-24 15:38:28 +00:00
|
|
|
# Configure basic networking options.
|
2024-12-06 18:04:47 +00:00
|
|
|
{ lib, namespace, ... }:
|
2024-07-06 16:50:45 +00:00
|
|
|
{
|
2024-05-07 22:02:59 +00:00
|
|
|
networking = {
|
2024-07-06 16:50:45 +00:00
|
|
|
# Default to DHCP. Set to false to use static IPs.
|
|
|
|
useDHCP = lib.mkDefault true;
|
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Enable networking via NetworkManager
|
|
|
|
networkmanager.enable = true;
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Enable firewall
|
|
|
|
nftables.enable = true;
|
|
|
|
firewall.enable = true;
|
|
|
|
};
|
2024-09-08 15:58:56 +00:00
|
|
|
|
|
|
|
# Enable fail2ban by default
|
|
|
|
# https://github.com/fail2ban/fail2ban
|
|
|
|
services.fail2ban.enable = true;
|
2024-05-07 22:02:59 +00:00
|
|
|
}
|