From 7ad2810efcbb84dc8e904ba69a09d3ffddea19bc Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Wed, 12 Feb 2025 08:54:11 +0100 Subject: argh --- modules/snorlax/uvm-guests/cpanel.nix | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 modules/snorlax/uvm-guests/cpanel.nix (limited to 'modules/snorlax/uvm-guests/cpanel.nix') diff --git a/modules/snorlax/uvm-guests/cpanel.nix b/modules/snorlax/uvm-guests/cpanel.nix new file mode 100644 index 0000000..51bc0d2 --- /dev/null +++ b/modules/snorlax/uvm-guests/cpanel.nix @@ -0,0 +1,36 @@ +{ pkgs, ... }: +{ + microvm.autostart = [ "cpanel" ]; + microvm.vms = { + cpanel = { + # The package set to use for the microvm. This also determines the microvm's architecture. + # Defaults to the host system's package set if not given. + pkgs = import pkgs { system = "x86_64-linux"; }; + + # (Optional) A set of special arguments to be passed to the MicroVM's NixOS modules. + #specialArgs = {}; + + # The configuration for the MicroVM. + # Multiple definitions will be merged as expected. + config = { + networking.hostName = "cpanel"; + + # It is highly recommended to share the host's nix-store + # with the VMs to prevent building huge images. + microvm.shares = [{ + source = "/nix/store"; + mountPoint = "/nix/.ro-store"; + tag = "ro-store"; + proto = "virtiofs"; + }]; + + microvm.interfaces = [{ + type = "bridge"; + }]; + + # Any other configuration for your MicroVM + # [...] + }; + }; + }; +} -- cgit v1.2.3