audit: don't install broken audit-rules.service

This commit is contained in:
Grimmauld
2025-09-19 11:00:30 +02:00
parent 8ba4115c7c
commit 8dd99d547d
2 changed files with 5 additions and 3 deletions
-3
View File
@@ -259,9 +259,6 @@ in
systemd.tmpfiles.packages = [ pkgs.audit.out ];
systemd.packages = [ pkgs.audit.out ];
# will try to look in /etc for rules to load, which we don't set up
systemd.services.audit-rules.enable = lib.mkDefault false;
systemd.services.auditd = {
wantedBy = [ "multi-user.target" ];
+5
View File
@@ -114,6 +114,9 @@ stdenv.mkDerivation (finalAttrs: {
installShellCompletion --bash init.d/audit.bash_completion
'';
# audit-rules.service relies on augenrules, and is not useful on a nixos system.
# It is intended to collect rule files from /etc/audit/rules.d, which we don't set up.
# Instead, we load audit rules in a dedicated module.
postFixup = ''
substituteInPlace $bin/bin/augenrules \
--replace-fail "/sbin/auditctl -R" "$bin/bin/auditctl -R" \
@@ -127,6 +130,8 @@ stdenv.mkDerivation (finalAttrs: {
coreutils
]
}
rm $out/lib/systemd/system/audit-rules.service
'';
enableParallelBuilding = true;