security: Initial commit

This commit is contained in:
PapaTutuWawa 2022-05-13 12:51:12 +02:00
parent b8d71e5127
commit 230335431c
2 changed files with 27 additions and 0 deletions

View File

@ -47,6 +47,9 @@
./virtualisation/default.nix ./virtualisation/default.nix
./virtualisation/gaming.nix ./virtualisation/gaming.nix
# Security
./security/apparmor.nix
# Pure options # Pure options
./base.nix ./base.nix
]; ];

View File

@ -0,0 +1,24 @@
{ 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";
};
};
};
}