nixos/dbus: Add AppArmor support
This commit is contained in:
parent
060d20de24
commit
e5e9887e38
1 changed files with 15 additions and 0 deletions
|
@ -11,6 +11,7 @@ let
|
||||||
homeDir = "/run/dbus";
|
homeDir = "/run/dbus";
|
||||||
|
|
||||||
configDir = pkgs.makeDBusConf {
|
configDir = pkgs.makeDBusConf {
|
||||||
|
inherit (cfg) apparmor;
|
||||||
suidHelper = "${config.security.wrapperDir}/dbus-daemon-launch-helper";
|
suidHelper = "${config.security.wrapperDir}/dbus-daemon-launch-helper";
|
||||||
serviceDirectories = cfg.packages;
|
serviceDirectories = cfg.packages;
|
||||||
};
|
};
|
||||||
|
@ -51,6 +52,20 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
apparmor = mkOption {
|
||||||
|
type = types.enum [ "enabled" "disabled" "required" ];
|
||||||
|
description = ''
|
||||||
|
AppArmor mode for dbus.
|
||||||
|
|
||||||
|
<literal>enabled</literal> enables mediation when it's
|
||||||
|
supported in the kernel, <literal>disabled</literal>
|
||||||
|
always disables AppArmor even with kernel support, and
|
||||||
|
<literal>required</literal> fails when AppArmor was not found
|
||||||
|
in the kernel.
|
||||||
|
'';
|
||||||
|
default = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
socketActivated = mkOption {
|
socketActivated = mkOption {
|
||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
|
|
Loading…
Reference in a new issue