From 2259fbdf4b703ca823ff390f63a39d6b80163e56 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Sat, 22 Aug 2020 22:59:26 +0200 Subject: [PATCH] apparmor: add apparmor_parser config file If the config does not exist, then apparmor_parser will throw a warning. To avoid that and make the parser configurable, we now add a new option to it. Signed-off-by: Sascha Grunert --- nixos/modules/security/apparmor.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix index cfc65b347bc..2ee10454fd2 100644 --- a/nixos/modules/security/apparmor.nix +++ b/nixos/modules/security/apparmor.nix @@ -23,11 +23,17 @@ in default = []; description = "List of packages to be added to apparmor's include path"; }; + parserConfig = mkOption { + type = types.str; + default = ""; + description = "AppArmor parser configuration file content"; + }; }; }; config = mkIf cfg.enable { environment.systemPackages = [ pkgs.apparmor-utils ]; + environment.etc."apparmor/parser.conf".text = cfg.parserConfig; boot.kernelParams = [ "apparmor=1" "security=apparmor" ];