nixos/auditd: ensure correct ordering w.r.t. shutdown.target

This looks like it's got a few other idiosyncrasies, but I'll leave it
alone for now.
This commit is contained in:
Philip Taron 2023-11-30 15:00:39 -08:00
parent 454f3cb58d
commit 407ef67228
No known key found for this signature in database

View file

@ -13,6 +13,8 @@ with lib;
systemd.services.auditd = {
description = "Linux Audit daemon";
wantedBy = [ "basic.target" ];
before = [ "shutdown.target" ];
conflicts = [ "shutdown.target "];
unitConfig = {
ConditionVirtualization = "!container";
@ -23,7 +25,7 @@ with lib;
path = [ pkgs.audit ];
serviceConfig = {
ExecStartPre="${pkgs.coreutils}/bin/mkdir -p /var/log/audit";
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/log/audit";
ExecStart = "${pkgs.audit}/bin/auditd -l -n -s nochange";
};
};