system/boot: increase maximum buffer size
References: https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes
This commit is contained in:
parent
a75d3f9ea8
commit
22700c13c7
|
@ -413,11 +413,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733660317,
|
"lastModified": 1734683762,
|
||||||
"narHash": "sha256-RaMvzfu7rsbYuwvY5DmtV2XHLZrOlzXFkd3n3YuCkkE=",
|
"narHash": "sha256-GnwQCZ9tx9Cb4PjPySnJrCYB4Fc3c288fw+sAeATXJY=",
|
||||||
"owner": "rebmit",
|
"owner": "rebmit",
|
||||||
"repo": "nix-exprs",
|
"repo": "nix-exprs",
|
||||||
"rev": "898ce2046d8066e21713ca2265f56e1ccdd74275",
|
"rev": "13d8ed59016e492edc92407d4691e45b4fc09d4e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -42,6 +42,7 @@ let
|
||||||
services.resolved
|
services.resolved
|
||||||
services.vnstat
|
services.vnstat
|
||||||
system.boot.sysctl.tcp-bbr
|
system.boot.sysctl.tcp-bbr
|
||||||
|
system.boot.sysctl.udp-buffer-size
|
||||||
# keep-sorted end
|
# keep-sorted end
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,11 @@ in
|
||||||
default = {
|
default = {
|
||||||
# standard ports
|
# standard ports
|
||||||
smtp = 25;
|
smtp = 25;
|
||||||
|
dns = 53;
|
||||||
http = 80;
|
http = 80;
|
||||||
https = 443;
|
https = 443;
|
||||||
smtp-tls = 465;
|
smtp-tls = 465;
|
||||||
smtp-starttls = 587;
|
smtp-submission = 587;
|
||||||
imap-tls = 993;
|
imap-tls = 993;
|
||||||
socks = 1080;
|
socks = 1080;
|
||||||
ssh = 2222;
|
ssh = 2222;
|
||||||
|
@ -28,6 +29,7 @@ in
|
||||||
mautrix-telegram = 4032;
|
mautrix-telegram = 4032;
|
||||||
rspamd-controller = 4040;
|
rspamd-controller = 4040;
|
||||||
rspamd-redis = 4041;
|
rspamd-redis = 4041;
|
||||||
|
caddy-admin = 4050;
|
||||||
|
|
||||||
# public ports
|
# public ports
|
||||||
enthalpy-ipsec = 13000;
|
enthalpy-ipsec = 13000;
|
||||||
|
|
|
@ -25,4 +25,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.restic.backups.b2.paths = [ config.services.caddy.dataDir ];
|
services.restic.backups.b2.paths = [ config.services.caddy.dataDir ];
|
||||||
|
|
||||||
|
services.caddy.globalConfig = ''
|
||||||
|
admin 127.0.0.1:${toString config.networking.ports.caddy-admin}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
http-port = config.networking.ports.keycloak;
|
http-port = config.networking.ports.keycloak;
|
||||||
proxy-headers = "xforwarded";
|
proxy-headers = "xforwarded";
|
||||||
hostname = "keycloak.rebmit.moe";
|
hostname = "keycloak.rebmit.moe";
|
||||||
|
cache = "local";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,11 @@ in
|
||||||
mkOpts = opts: lib.concatLists (lib.mapAttrsToList mkKeyVal opts);
|
mkOpts = opts: lib.concatLists (lib.mapAttrsToList mkKeyVal opts);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"127.0.0.1:${toString config.networking.ports.smtp-starttls}".args = lib.mkBefore (mkOpts {
|
"127.0.0.1:${toString config.networking.ports.smtp-submission}".args = mkOpts {
|
||||||
smtpd_sasl_auth_enable = "yes";
|
smtpd_sasl_auth_enable = "yes";
|
||||||
smtpd_sasl_type = "dovecot";
|
smtpd_sasl_type = "dovecot";
|
||||||
smtpd_sasl_path = "/run/dovecot2/auth-postfix";
|
smtpd_sasl_path = "/run/dovecot2/auth-postfix";
|
||||||
});
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,9 +58,12 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
enableDHE = false;
|
||||||
|
enableImap = true;
|
||||||
enableLmtp = true;
|
enableLmtp = true;
|
||||||
enablePAM = false;
|
enablePAM = false;
|
||||||
enableDHE = false;
|
enablePop3 = false;
|
||||||
|
enableQuota = false;
|
||||||
mailPlugins.perProtocol.lmtp.enable = [ "sieve" ];
|
mailPlugins.perProtocol.lmtp.enable = [ "sieve" ];
|
||||||
mailLocation = "maildir:~";
|
mailLocation = "maildir:~";
|
||||||
mailboxes = {
|
mailboxes = {
|
||||||
|
@ -160,7 +163,7 @@ in
|
||||||
}
|
}
|
||||||
proxy {
|
proxy {
|
||||||
proxy_protocol v2
|
proxy_protocol v2
|
||||||
upstream 127.0.0.1:${toString config.networking.ports.smtp-starttls}
|
upstream 127.0.0.1:${toString config.networking.ports.smtp-submission}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
lmtp = {
|
lmtp = {
|
||||||
args = [ "flags=O" ];
|
args = [ "flags=O" ];
|
||||||
};
|
};
|
||||||
"127.0.0.1:${toString config.networking.ports.smtp-starttls}" = {
|
"127.0.0.1:${toString config.networking.ports.smtp-submission}" = {
|
||||||
type = "inet";
|
type = "inet";
|
||||||
private = false;
|
private = false;
|
||||||
command = "smtpd";
|
command = "smtpd";
|
||||||
|
|
8
nixos/profiles/system/boot/sysctl/udp-buffer-size.nix
Normal file
8
nixos/profiles/system/boot/sysctl/udp-buffer-size.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
# https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"net.core.rmem_max" = 7500000;
|
||||||
|
"net.core.wmem_max" = 7500000;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue