blob: fb3109998a541b1e5d9dcf3312cb05aba2434967 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{
lib,
pkgs,
config,
...
}:
{
networking.firewall.allowPing = true;
# Default to systemd-networkd usage.
networking.useNetworkd = lib.mkDefault true;
systemd.network.wait-online.anyInterface = lib.mkDefault config.networking.useDHCP;
# Use systemd-resolved for DoT support.
services.resolved = {
enable = true;
dnssec = "false";
extraConfig = ''
DNSOverTLS=yes
'';
};
# Used by systemd-resolved, not directly by resolv.conf.
networking.nameservers = [
"8.8.8.8#dns.google"
"1.0.0.1#cloudflare-dns.com"
];
networking.firewall.logRefusedConnections = false;
boot.kernel.sysctl = {
"net.ipv4.tcp_fastopen" = 3;
"net.ipv4.tcp_tw_reuse" = 1;
};
environment.systemPackages = with pkgs; [
mtr
tcpdump
traceroute
];
}
|