From 03515a8da600cbe56ba9d4c3c9b33a2cca45ef08 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 8 Mar 2021 15:11:17 +0100 Subject: [PATCH] examples/qemu: disable hardened preset - Hardening is irrelevant in examples - The decreased performance is especially noticeable in VMs --- examples/qemu-vm/vm-config.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/qemu-vm/vm-config.nix b/examples/qemu-vm/vm-config.nix index a1f8b70..ca91e55 100644 --- a/examples/qemu-vm/vm-config.nix +++ b/examples/qemu-vm/vm-config.nix @@ -1,7 +1,12 @@ { - virtualisation.graphics = false; - services.mingetty.autologinUser = "root"; - users.users.root = { - openssh.authorizedKeys.keyFiles = [ ./id-vm.pub ]; + # Disable the hardened preset to improve VM performance + disabledModules = [ ]; + + config = { + virtualisation.graphics = false; + services.mingetty.autologinUser = "root"; + users.users.root = { + openssh.authorizedKeys.keyFiles = [ ./id-vm.pub ]; + }; }; }