nixfmt-rfc-style

There is nothing in this commit except for the changes made by
nix-shell -p nixfmt-rfc-style --run "nixfmt ."

If this has mucked up your open branches then sorry about that. You
can probably nixfmt them to match before merging
This commit is contained in:
Daniel Barlow
2025-02-10 21:55:08 +00:00
parent 13cc5a8992
commit 7e2b0068e6
211 changed files with 6049 additions and 4355 deletions

View File

@@ -24,30 +24,34 @@ let
};
routeros = writeShellApplication {
name = "routeros";
runtimeInputs = [ qemu ros-exec-script ];
runtimeInputs = [
qemu
ros-exec-script
];
text = ''
RUNTIME_DIRECTORY=$1
test -d "$RUNTIME_DIRECTORY" || exit 1
${qemu}/bin/qemu-system-x86_64 \
-M q35 \
-m 1024 \
-accel kvm \
-display none \
-daemonize \
-pidfile "$RUNTIME_DIRECTORY/pid" \
-serial "unix:$RUNTIME_DIRECTORY/console,server,nowait"\
-monitor "unix:$RUNTIME_DIRECTORY/monitor,server,nowait" \
-snapshot -drive file=${chr-image}/chr-7.7.img,format=raw,if=virtio \
-chardev "socket,path=$RUNTIME_DIRECTORY/qmp,server=on,wait=off,id=qga0" \
-device virtio-serial \
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
-netdev socket,id=access,mcast=230.0.0.1:1234,localaddr=127.0.0.1 \
-device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=access,mac=ba:ad:1d:ea:11:02 \
-netdev socket,id=world,mcast=230.0.0.1:1236,localaddr=127.0.0.1 \
-device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=world,mac=ba:ad:1d:ea:11:01
ros-exec-script "$RUNTIME_DIRECTORY/qmp" ${./routeros.config}
RUNTIME_DIRECTORY=$1
test -d "$RUNTIME_DIRECTORY" || exit 1
${qemu}/bin/qemu-system-x86_64 \
-M q35 \
-m 1024 \
-accel kvm \
-display none \
-daemonize \
-pidfile "$RUNTIME_DIRECTORY/pid" \
-serial "unix:$RUNTIME_DIRECTORY/console,server,nowait"\
-monitor "unix:$RUNTIME_DIRECTORY/monitor,server,nowait" \
-snapshot -drive file=${chr-image}/chr-7.7.img,format=raw,if=virtio \
-chardev "socket,path=$RUNTIME_DIRECTORY/qmp,server=on,wait=off,id=qga0" \
-device virtio-serial \
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
-netdev socket,id=access,mcast=230.0.0.1:1234,localaddr=127.0.0.1 \
-device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=access,mac=ba:ad:1d:ea:11:02 \
-netdev socket,id=world,mcast=230.0.0.1:1236,localaddr=127.0.0.1 \
-device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=world,mac=ba:ad:1d:ea:11:01
ros-exec-script "$RUNTIME_DIRECTORY/qmp" ${./routeros.config}
'';
};
in {
in
{
inherit routeros ros-exec-script;
}