diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2019-05-11 18:19:35 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2019-05-11 18:21:38 +0200 |
commit | 68f5d1fa4cd6400fa697cd7cf6dbb2cf8de17e34 (patch) | |
tree | 8c7e4ffe0aa845716118e7388579a7c6c0540a3a /nixos/modules | |
parent | bc94dcf500286495e3c478a9f9322debc94c4304 (diff) |
nixos/apparmor: ensure that apparmor is selected at boot
Otherwise we're subject to whatever defaults were selected at kernel build
time.
See also: https://github.com/NixOS/nixpkgs/issues/61145
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/security/apparmor.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix index 4512a7a80f6d..cfc65b347bc6 100644 --- a/nixos/modules/security/apparmor.nix +++ b/nixos/modules/security/apparmor.nix @@ -29,6 +29,8 @@ in config = mkIf cfg.enable { environment.systemPackages = [ pkgs.apparmor-utils ]; + boot.kernelParams = [ "apparmor=1" "security=apparmor" ]; + systemd.services.apparmor = let paths = concatMapStrings (s: " -I ${s}/etc/apparmor.d") ([ pkgs.apparmor-profiles ] ++ cfg.packages); |