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 <sgrunert@suse.com>
This commit is contained in:
parent
6a7b11055c
commit
2259fbdf4b
1 changed files with 6 additions and 0 deletions
|
@ -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" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue