nix-config/hosts/server.nix
Jordan Holt 328a50c365
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
Refactor modules into nixos and home-manager
2025-01-19 01:22:43 +00:00

62 lines
1015 B
Nix

{ config, lib, pkgs, ... }:
{
imports = [
./common.nix
];
documentation.enable = false;
fonts.fontconfig.enable = false;
security = {
acme = {
acceptTerms = true;
defaults = {
email = "hostmaster@vimium.com";
group = "nginx";
webroot = "/var/lib/acme/acme-challenge";
};
};
# auditd.enable = true;
# audit = {
# enable = true;
# rules = [
# "-a exit,always -F arch=b64 -S execve"
# ];
# };
};
systemd = {
enableEmergencyMode = false;
sleep.extraConfig = ''
AllowSuspend=no
AllowHibernation=no
'';
watchdog = {
runtimeTime = "20s";
rebootTime = "30s";
};
};
services.fail2ban = {
enable = true;
bantime = "1h";
bantime-increment = {
enable = true;
maxtime = "24h";
rndtime = "7m";
};
ignoreIP = [
"100.64.0.0/10"
];
};
modules.services.tailscale = {
enable = true;
restrictSSH = false;
};
}