nixfiles/presets/nixos/serverBase.nix

34 lines
691 B
Nix
Raw Permalink Normal View History

2023-10-30 13:57:30 +00:00
{tree, ...}: {
2023-09-18 03:56:58 +01:00
imports = with tree; [
users.root
2024-07-24 15:11:46 +01:00
presets.home-manager.by-user.root.minimalServer
2023-09-18 03:56:58 +01:00
2024-07-24 14:13:59 +01:00
profiles.nixos.sshd
2023-09-18 03:56:58 +01:00
2024-07-24 14:13:59 +01:00
profiles.nixos.nixGC
profiles.nixos.serverExtras
2023-09-18 03:56:58 +01:00
];
networking.firewall = {
enable = true;
allowPing = true;
checkReversePath = "loose";
2024-07-24 14:13:59 +01:00
allowedTCPPorts = [22];
2023-09-18 03:56:58 +01:00
};
# TODO: Better DNS setup
services.resolved.enable = false;
environment.etc."resolv.conf".text = ''
nameserver 8.8.8.8
nameserver 8.8.4.4
'';
boot.kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
2023-09-18 03:56:58 +01:00
"fs.inotify.max_user_watches" = 1024 * 64 * 16;
};
time.timeZone = "Europe/London";
}