better vm launch script

This commit is contained in:
sinavir 2024-01-17 13:31:26 +01:00
parent 01a1ba39bf
commit c6e27fd9d2
2 changed files with 39 additions and 3 deletions

View file

@ -1,7 +1,23 @@
#!/usr/bin/env bash set -o errexit
export NIXPKGS_ALLOW_UNFREE=1 export NIXPKGS_ALLOW_UNFREE=1
RESULT=$(nix-build -E 'import ((import ./npins).nixpkgs + "/nixos")' -A config.system.build.vm -I nixos-config=configuration.nix --no-out-link $@) # get script dir
#
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
$RESULT/bin/run-nixos-vm pushd "$DIR" || exit 1
RESULT=$(nix-build -E 'import ((import ./npins).nixpkgs + "/nixos")' -A config.system.build.vm -I nixos-config=configuration.nix --no-out-link $@) || popd || exit 1
popd || exit 1
echo -e "Running: $RESULT\n"
"$RESULT/bin/run-nixos-vm"

View file

@ -0,0 +1,20 @@
fbneo-allow-depth-32 = "enabled"
fbneo-allow-patched-romsets = "enabled"
fbneo-analog-speed = "100%"
fbneo-cpu-speed-adjust = "100%"
fbneo-dipswitch-dkong-Bonus_Life = "7000"
fbneo-dipswitch-dkong-Cabinet = "Upright"
fbneo-dipswitch-dkong-Coinage = "1 Coin 1 Credits"
fbneo-dipswitch-dkong-Lives = "3"
fbneo-dipswitch-dkong-Palette = "New"
fbneo-fixed-frameskip = "0"
fbneo-fm-interpolation = "4-point 3rd order"
fbneo-force-60hz = "disabled"
fbneo-frameskip-manual-threshold = "33"
fbneo-frameskip-type = "disabled"
fbneo-hiscores = "enabled"
fbneo-lightgun-crosshair-emulation = "hide with lightgun device"
fbneo-lowpass-filter = "disabled"
fbneo-sample-interpolation = "4-point 3rd order"
fbneo-samplerate = "48000"
fbneo-vertical-mode = "disabled"