From a6cc13850727823312cfdd7172c51851bc4b3ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sun, 8 Mar 2026 15:25:22 +0000 Subject: [PATCH] feat: optimize ephvm image size --- hosts/ephvm/configuration.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hosts/ephvm/configuration.nix b/hosts/ephvm/configuration.nix index 9b1d450..406d7be 100644 --- a/hosts/ephvm/configuration.nix +++ b/hosts/ephvm/configuration.nix @@ -10,6 +10,29 @@ profiles.base.enable = true; + # no hardware firmware needed in a VM + hardware.enableRedistributableFirmware = lib.mkForce false; + hardware.wirelessRegulatoryDatabase = lib.mkForce false; + + documentation.enable = false; + environment.defaultPackages = [ ]; + + # compressed qcow2, no channel copy + image.modules.qemu = + { config, modulesPath, ... }: + { + system.build.image = lib.mkForce ( + import (modulesPath + "/../lib/make-disk-image.nix") { + inherit lib config pkgs; + inherit (config.virtualisation) diskSize; + inherit (config.image) baseName; + format = "qcow2-compressed"; + copyChannel = false; + partitionTableType = "legacy"; + } + ); + }; + vm-guest = { enable = true; headless = true;