From e36bec661c2dae4c306867fa58faea833806af52 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 16 Dec 2014 09:54:02 +0100 Subject: [PATCH] nixos/virtualbox: Fix warning on enableHardening. The warning was displayed whenever services.virtualboxHost.enable was true, but if people were to enable hardening, they'd still get that annoying message. Signed-off-by: aszlig --- nixos/modules/programs/virtualbox-host.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/virtualbox-host.nix b/nixos/modules/programs/virtualbox-host.nix index dd6fbad48689..c6abc9ddf894 100644 --- a/nixos/modules/programs/virtualbox-host.nix +++ b/nixos/modules/programs/virtualbox-host.nix @@ -54,12 +54,12 @@ in boot.extraModulePackages = [ virtualbox ]; environment.systemPackages = [ virtualbox ]; - warnings = singleton ( + warnings = mkIf (!cfg.enableHardening) (singleton ( "Hardening is currently disabled for VirtualBox, because of some " + "issues in conjunction with host-only-interfaces. If you don't use " + "hostonlyifs, it's strongly recommended to set " + "`services.virtualboxHost.enableHardening = true'!" - ); + )); security.setuidOwners = let mkVboxStub = program: {