From 3ed22c6d4940b09d90e12b7b7934b55d06da0b7f Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 10 Oct 2022 23:28:49 +0000 Subject: vm/app/mg.nix: init mg is a text editor with a built-in filesystem browser, so it will be useful for testing virtiofs. Signed-off-by: Alyssa Ross Message-Id: <20221010232909.1953738-10-hi@alyssa.is> --- host/initramfs/extfs.nix | 4 +++- vm/app/mg.nix | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 vm/app/mg.nix diff --git a/host/initramfs/extfs.nix b/host/initramfs/extfs.nix index 5c5850f..66be95c 100644 --- a/host/initramfs/extfs.nix +++ b/host/initramfs/extfs.nix @@ -11,12 +11,13 @@ let appvm-catgirl = import ../../vm/app/catgirl.nix { inherit config; }; appvm-lynx = import ../../vm/app/lynx.nix { inherit config; }; + appvm-mg = import ../../vm/app/mg.nix { inherit config; }; in runCommand "ext.ext4" { nativeBuildInputs = [ e2fsprogs ]; } '' - mkdir -p root/svc/data/appvm-{catgirl,lynx} + mkdir -p root/svc/data/appvm-{catgirl,lynx,mg} cd root tar -C ${netvm} -c data | tar -C svc -x @@ -24,6 +25,7 @@ runCommand "ext.ext4" { tar -C ${appvm-catgirl} -c . | tar -C svc/data/appvm-catgirl -x tar -C ${appvm-lynx} -c . | tar -C svc/data/appvm-lynx -x + tar -C ${appvm-mg} -c . | tar -C svc/data/appvm-mg -x mkfs.ext4 -d . $out 16T resize2fs -M $out diff --git a/vm/app/mg.nix b/vm/app/mg.nix new file mode 100644 index 0000000..391b518 --- /dev/null +++ b/vm/app/mg.nix @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2022 Alyssa Ross + +{ config ? import ../../../nix/eval-config.nix {} }: + +import ../make-vm.nix { inherit config; } { + providers.net = [ "netvm" ]; + sharedDirs.virtiofs0.path = "/ext"; + run = "${config.pkgs.pkgsStatic.mg}/bin/mg"; +} -- cgit 1.4.1