git.iko.soy/typeable/nixpkgs
on master help sign in
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>

commit2259fbdf4b703ca823ff390f63a39d6b80163e56 authorSascha Grunert <sgrunert@suse.com> dateSat 22 Aug 2020, 22:59 (6 years ago) parent6a7b110
1 file changed+6
nixos/modules/security/apparmor.nix+6
nixos/modules/security/apparmor.nix+6
@@ -23,11 +23,17 @@ in
2323 default = [];
2424 description = "List of packages to be added to apparmor's include path";
2525 };
26+ parserConfig = mkOption {
27+ type = types.str;
28+ default = "";
29+ description = "AppArmor parser configuration file content";
30+ };
2631 };
2732 };
2833
2934 config = mkIf cfg.enable {
3035 environment.systemPackages = [ pkgs.apparmor-utils ];
36+ environment.etc."apparmor/parser.conf".text = cfg.parserConfig;
3137
3238 boot.kernelParams = [ "apparmor=1" "security=apparmor" ];
3339