From 454f3cb58d2ea69cfc2cda071c760e34aaa59813 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 30 Nov 2023 14:57:59 -0800 Subject: [PATCH] nixos/apparmor: ensure correct ordering w.r.t. shutdown.target --- nixos/modules/security/apparmor.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix index 24b48338ed77..ea1af6c6e2f2 100644 --- a/nixos/modules/security/apparmor.nix +++ b/nixos/modules/security/apparmor.nix @@ -164,7 +164,8 @@ in "local-fs.target" "systemd-journald-audit.socket" ]; - before = [ "sysinit.target" ]; + before = [ "sysinit.target" "shutdown.target" ]; + conflicts = [ "shutdown.target" ]; wantedBy = [ "multi-user.target" ]; unitConfig = { Description="Load AppArmor policies";