mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-22 19:15:48 +02:00
Hardening: Vulnix + kernel hardening
Signed-off-by: Hadi <hadi@example.fr>
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user