From 7c758967e05ecd6c844a0dde8345389e60d14197 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 14 Jun 2020 17:08:18 +0800 Subject: [PATCH] wfvm: remove more dead code --- artiq-fast/wfvm/qemu.nix | 41 ---------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 artiq-fast/wfvm/qemu.nix diff --git a/artiq-fast/wfvm/qemu.nix b/artiq-fast/wfvm/qemu.nix deleted file mode 100644 index f02e6d3..0000000 --- a/artiq-fast/wfvm/qemu.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ pkgs, qemuMem }: - -with pkgs; - -let - qemu-img = "${qemu_kvm}/bin/qemu-img"; - runQemu = isolateNetwork: forwardedPorts: extraArgs: - let - restrict = - if isolateNetwork - then "on" - else "off"; - # use socat instead of `tcp:…` to allow multiple connections - guestfwds = - builtins.concatStringsSep "" - ( - map ( - { listenAddr, targetAddr, port }: - ",guestfwd=tcp:${listenAddr}:${toString port}-cmd:${socat}/bin/socat\\ -\\ tcp:${targetAddr}:${toString port}" - ) forwardedPorts - ); - args = [ - "-enable-kvm" - "-m" - qemuMem - "-bios" - "${OVMF.fd}/FV/OVMF.fd" - "-netdev" - "user,id=n1,net=192.168.1.0/24,restrict=${restrict},hostfwd=tcp::2022-:22${guestfwds}" - "-device" - "e1000,netdev=n1" - ]; - argStr = builtins.concatStringsSep " " (args ++ extraArgs); - in - "${qemu_kvm}/bin/qemu-system-x86_64 ${argStr}"; - -in -{ - inherit qemu-img runQemu; - inputs = [ qemu_kvm ]; -}