security: Initial commit
This commit is contained in:
parent
b8d71e5127
commit
230335431c
@ -47,6 +47,9 @@
|
||||
./virtualisation/default.nix
|
||||
./virtualisation/gaming.nix
|
||||
|
||||
# Security
|
||||
./security/apparmor.nix
|
||||
|
||||
# Pure options
|
||||
./base.nix
|
||||
];
|
||||
|
24
modules/security/apparmor.nix
Normal file
24
modules/security/apparmor.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user