From 544883897ac5f7954cc0d8609035f1babf221988 Mon Sep 17 00:00:00 2001 From: Bailey Stevens Date: Thu, 3 Aug 2023 19:25:15 -0400 Subject: [PATCH] Adds port forwarding to test vm. --- flake.nix | 1 + platforms/clementine.nix | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/flake.nix b/flake.nix index 673815a..372c596 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ inherit pkgs; modules = [ ./citrus.nix + "${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" ./platforms/clementine.nix ]; }; diff --git a/platforms/clementine.nix b/platforms/clementine.nix index d238799..6ab6198 100644 --- a/platforms/clementine.nix +++ b/platforms/clementine.nix @@ -1,4 +1,12 @@ {pkgs, ...}: { networking.hostName = "clementine"; + virtualisation = { + forwardPorts = [ + { from = "host"; host.port = 2222; guest.port = 22; } + ]; + graphics = true; + qemu.options = [ "-bios" "${pkgs.OVMF.fd}/FV/OVMF.fd" ]; + }; + services.qemuGuest.enable = true; }