From 2c3ca6296523e7154d4427e937ccbd158fdb4bcb Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Fri, 17 Jun 2022 01:53:10 +0100 Subject: [PATCH] nixos/vms: Add vm-tty utility inside host --- nixos/modules/vms.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/vms.nix b/nixos/modules/vms.nix index e8bf22b..0046c46 100644 --- a/nixos/modules/vms.nix +++ b/nixos/modules/vms.nix @@ -195,6 +195,13 @@ in } ]; + environment.systemPackages = [ + (pkgs.writeShellScriptBin "vm-tty" '' + [ $# -eq 1 ] || (echo "usage: $0 " >&2; exit 1) + exec ${pkgs.minicom}/bin/minicom -D unix#/run/vms/"$1"/tty.sock + '') + ]; + services.udev = { packages = optionals