summaryrefslogtreecommitdiff
path: root/modules/snorlax/uvm-guests
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-02-12 08:54:11 +0100
committerJasper Ras <jras@hostnet.nl>2025-02-12 08:54:11 +0100
commit7ad2810efcbb84dc8e904ba69a09d3ffddea19bc (patch)
tree3257f70b60d8feeb5ebc6b3774ca8ac0c7aaa119 /modules/snorlax/uvm-guests
parent07f84bb581e369ff79100f0417e9d277f3c1fb61 (diff)
argh
Diffstat (limited to 'modules/snorlax/uvm-guests')
-rw-r--r--modules/snorlax/uvm-guests/cpanel.nix36
-rw-r--r--modules/snorlax/uvm-guests/default.nix4
2 files changed, 40 insertions, 0 deletions
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
+ # [...]
+ };
+ };
+ };
+}
diff --git a/modules/snorlax/uvm-guests/default.nix b/modules/snorlax/uvm-guests/default.nix
new file mode 100644
index 0000000..39b0611
--- /dev/null
+++ b/modules/snorlax/uvm-guests/default.nix
@@ -0,0 +1,4 @@
+{ ... }:
+{
+ imports = [ ./cpanel.nix ];
+}