nixos-config/modules/security/apparmor.nix

25 lines
499 B
Nix
Raw Permalink Normal View History

2022-05-13 10:51:12 +00:00
{ config, lib, pkgs, ... }:
let
cfg = config.ptw.security.apparmor;
in {
options.ptw.security.apparmor = {
enable = lib.mkEnableOption "Enable AppArmor";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
apparmor-bin-utils
];
services.dbus.apparmor = "enabled";
security.apparmor = {
enable = true;
enableCache = true;
includes = {
profiles = "${pkgs.apparmor-profiles}/etc/apparmor.d";
};
};
};
}