diff --git a/debian/install b/debian/install index 7d34230c0c..9b98714a98 100644 --- a/debian/install +++ b/debian/install @@ -1,4 +1,5 @@ chunkcheck usr/bin quickemu usr/bin quickget usr/bin +quickreport usr/bin windowskey usr/bin diff --git a/package.nix b/package.nix index 30801ea45b..099483625c 100644 --- a/package.nix +++ b/package.nix @@ -66,11 +66,11 @@ stdenv.mkDerivation rec { runHook preInstall installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.1 - install -Dm755 -t "$out/bin" chunkcheck quickemu quickget windowskey + install -Dm755 -t "$out/bin" chunkcheck quickemu quickget quickreport windowskey # spice-gtk needs to be put in suffix so that when virtualisation.spiceUSBRedirection # is enabled, the wrapped spice-client-glib-usb-acl-helper is used - for f in chunkcheck quickget quickemu windowskey; do + for f in chunkcheck quickget quickemu quickreport windowskey; do wrapProgram $out/bin/$f \ --prefix PATH : "${lib.makeBinPath runtimePaths}" \ --suffix PATH : "${lib.makeBinPath [ spice-gtk ]}" diff --git a/quickreport b/quickreport new file mode 100755 index 0000000000..556b71238d --- /dev/null +++ b/quickreport @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +quick_report() { + local GPUS + local PRETTY_NAME + local VERSION + if [ -e /etc/os-release ]; then + PRETTY_NAME="$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)" + else + PRETTY_NAME="Unknown OS" + fi + + if command -v quickemu &> /dev/null; then + VERSION=$(quickemu --version) + echo \ +"---------------------------------- + Quickemu ${VERSION} +----------------------------------" + echo -e "Distro:\t${PRETTY_NAME}" + echo -e "Kernel:\t$(uname -s -r -m)" + echo -e "Memory:\t$(free --si -h | awk '/Mem:/{print $2}')" + # Break IFS on new line + IFS=$'\n' + GPUS=$(lspci | grep -i vga | cut -d':' -f3) + + if [ "$(echo "${GPUS}" | wc -l)" -eq 1 ]; then + echo "GPU:" + else + echo "GPUs:" + fi + for GPU in ${GPUS}; do + echo " -${GPU}" + done + else + echo \ +"---------------------------------- + Quickemu missing! +----------------------------------" + exit 1 + fi + + if command -v curl &> /dev/null; then + VERSION=$(curl --version) + echo \ +"---------------------------------- + curl $(echo "${VERSION}" | head -1 | cut -d' ' -f2) +----------------------------------" + echo -e "Libraries:$(echo "${VERSION}" | head -1 | cut -d')' -f2-)" + echo -e "Protocols:$(echo "${VERSION}" | tail +3 | head -1 | cut -d':' -f2-)" + echo -e "Features: $(echo "${VERSION}" | tail +4 | head -1 | cut -d':' -f2-)" + else + echo \ +"---------------------------------- + curl missing +----------------------------------" + fi + + if command -v qemu-system-"$(uname -m)" &> /dev/null; then + VERSION=$(qemu-system-"$(uname -m)" -version | head -1 | cut -d' ' -f4) + echo \ +"---------------------------------- + QEMU ${VERSION} +----------------------------------" + qemu-system-"$(uname -m)" -cpu help + else + echo \ +"---------------------------------- + QEMU missing +----------------------------------" + fi + + echo \ +"---------------------------------- + CPU +----------------------------------" + lscpu +} + +clear +quick_report | tee quickreport.txt