Hardening: Vulnix + kernel hardening

Signed-off-by: Hadi <hadi@example.fr>
This commit is contained in:
Hadi
2026-08-21 14:38:47 +02:00
parent 4e016613cd
commit cb74a5744f
7 changed files with 58 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
# Vulnix scans the Nix store against the NVD CVE feed to find packages with
# known vulnerabilities.
{pkgs, ...}: {
environment.systemPackages = [pkgs.vulnix];
systemd.services.vulnix-scan = {
description = "Scan the system closure for known vulnerabilities (vulnix)";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.vulnix}/bin/vulnix --system --cache-dir /var/cache/vulnix";
CacheDirectory = "vulnix";
# vulnix exits non-zero when it finds vulnerabilities; that's expected,
# don't let systemd treat the scan itself as a failure.
SuccessExitStatus = "1 2";
};
};
systemd.timers.vulnix-scan = {
description = "Daily vulnix scan";
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
RandomizedDelaySec = "1h";
};
};
}