2024-07-01 17:11:01 +00:00
|
|
|
{ lib, pkgs, ... }: {
|
2024-07-17 15:32:34 +00:00
|
|
|
imports = [
|
|
|
|
./known-ssh-keys.nix
|
|
|
|
];
|
|
|
|
|
2024-07-01 17:49:32 +00:00
|
|
|
nixpkgs.overlays = import ../overlays;
|
|
|
|
|
2024-07-05 11:29:47 +00:00
|
|
|
nix.package = lib.mkDefault pkgs.lix;
|
2024-07-01 17:11:01 +00:00
|
|
|
services.openssh.enable = lib.mkForce true;
|
|
|
|
|
2024-07-11 00:05:35 +00:00
|
|
|
networking.nftables.enable = true;
|
2024-07-01 17:11:01 +00:00
|
|
|
networking.firewall.enable = true;
|
|
|
|
networking.firewall.logRefusedConnections = false;
|
|
|
|
networking.firewall.logReversePathDrops = true;
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
recommendedOptimisation = lib.mkDefault true;
|
|
|
|
recommendedTlsSettings = lib.mkDefault true;
|
|
|
|
recommendedProxySettings = lib.mkDefault true;
|
|
|
|
recommendedGzipSettings = lib.mkDefault true;
|
2024-07-10 11:55:28 +00:00
|
|
|
eventsConfig = ''
|
|
|
|
worker_connections 8192;
|
|
|
|
'';
|
|
|
|
appendConfig = ''
|
|
|
|
worker_rlimit_nofile 16384;
|
|
|
|
'';
|
2024-07-01 17:11:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
persistent = true;
|
2024-07-17 13:43:29 +00:00
|
|
|
dates = lib.mkDefault "daily";
|
2024-07-01 17:11:01 +00:00
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
2024-07-09 22:52:41 +00:00
|
|
|
|
|
|
|
services.journald.extraConfig = "SystemMaxUse=512M";
|
|
|
|
|
|
|
|
boot.kernelParams = [
|
|
|
|
"panic=30" "boot.panic_on_fail"
|
|
|
|
];
|
2024-07-10 13:45:10 +00:00
|
|
|
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
# Set default TCP congestion control algorithm
|
|
|
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
|
|
|
|
|
|
|
# Enable ECN
|
|
|
|
"net.ipv4.tcp_ecn" = 1;
|
|
|
|
|
|
|
|
# Enable TCP fast open
|
|
|
|
"net.ipv4.tcp_fastopen" = 3;
|
|
|
|
};
|
|
|
|
|
|
|
|
# reduce closure size, feel free to add your locale here
|
|
|
|
i18n.supportedLocales = [
|
|
|
|
"en_US.UTF-8/UTF-8"
|
|
|
|
"fr_FR.UTF-8/UTF-8"
|
|
|
|
];
|
2024-08-13 20:38:40 +00:00
|
|
|
|
|
|
|
time.timeZone = "UTC";
|
2024-07-01 17:11:01 +00:00
|
|
|
}
|