Implement monorepo layout
Implemented the nexantic monorepo.
Smalltown code was moved to `core`. From now on all code will live in top level directories named after the projects with the exception for general purpose libraries which should go to `<lang>libs`.
General build and utility folders are underscore prefixed.
The repo name will from now on be rNXT (nexantic). I think this change makes sense since components in this repo will not all be part of Smalltown, the Smalltown brand has been claimed by Signon GmbH so we need to change it anyway and the longer we wait the harder it will be to change/move it.
Test Plan: Launched Smalltown using `./scripts/bin/bazel run //core/scripts:launch`
X-Origin-Diff: phab/D210
GitOrigin-RevId: fa5a7f08143d2ead2cb7206b4c63ab641794162c
diff --git a/scripts/BUILD b/scripts/BUILD
deleted file mode 100644
index 2761d41..0000000
--- a/scripts/BUILD
+++ /dev/null
@@ -1,10 +0,0 @@
-sh_binary(
- name = "launch",
- srcs = ["launch.sh"],
- tags = ["local"],
- data = [
- "@//:image",
- "@//:swtpm_data",
- "@edk2//:firmware",
- ],
-)
diff --git a/scripts/bazel_copy_generated_for_ide.sh b/scripts/bazel_copy_generated_for_ide.sh
index e6c8ee0..0473e40 100755
--- a/scripts/bazel_copy_generated_for_ide.sh
+++ b/scripts/bazel_copy_generated_for_ide.sh
@@ -2,5 +2,5 @@
# Copy generated Go protobuf libraries to a place where a non-Bazel-aware IDE can find them.
# Locally, a symlink will be sufficient.
-mkdir -p generated
-rsync -av --delete --exclude '*.a' bazel-bin/api/*/linux_amd64_stripped/*/git.monogon.dev/source/smalltown.git/generated/* generated/
+mkdir -p smalltown/generated
+rsync -av --delete --exclude '*.a' bazel-bin/smalltown/api/*/linux_amd64_stripped/*/git.monogon.dev/source/nexantic.git/smalltown/generated/* smalltown/generated/
diff --git a/scripts/create_container.sh b/scripts/create_container.sh
index 5b4c65d..0067d72 100755
--- a/scripts/create_container.sh
+++ b/scripts/create_container.sh
@@ -16,7 +16,7 @@
fi
# Rebuild base image
-podman build -t smalltown-builder .
+podman build -t nexantic-builder build
# Set up SELinux contexts to prevent the container from writing to
# files that would allow for easy breakouts via tools ran on the host.
@@ -35,5 +35,5 @@
--device /dev/kvm \
--privileged \
--userns=keep-id \
- --name=smalltown-dev \
- smalltown-builder
+ --name=nexantic-dev \
+ nexantic-builder
diff --git a/scripts/destroy_container.sh b/scripts/destroy_container.sh
index 13fefe3..11d252d 100755
--- a/scripts/destroy_container.sh
+++ b/scripts/destroy_container.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-podman stop smalltown-dev
-podman rm smalltown-dev --force
+podman stop nexantic-dev
+podman rm nexantic-dev --force
diff --git a/scripts/launch.sh b/scripts/launch.sh
deleted file mode 100755
index 69cc5fe..0000000
--- a/scripts/launch.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-swtpm socket --tpmstate dir=tpm --ctrl type=unixio,path=tpm-socket --tpm2 &
-
-qemu-system-x86_64 \
- -cpu host -smp sockets=1,cpus=1,cores=2,threads=2,maxcpus=4 -m 1024 -machine q35 -enable-kvm -nographic -nodefaults \
- -drive if=pflash,format=raw,readonly,file=external/edk2/OVMF_CODE.fd \
- -drive if=pflash,format=raw,snapshot=on,file=external/edk2/OVMF_VARS.fd \
- -drive if=virtio,format=raw,snapshot=on,cache=unsafe,file=smalltown.img \
- -netdev user,id=net0,hostfwd=tcp::7833-:7833,hostfwd=tcp::7834-:7834 \
- -device virtio-net-pci,netdev=net0 \
- -chardev socket,id=chrtpm,path=tpm-socket \
- -tpmdev emulator,id=tpm0,chardev=chrtpm \
- -device tpm-tis,tpmdev=tpm0 \
- -debugcon file:debug.log \
- -global isa-debugcon.iobase=0x402 \
- -device ipmi-bmc-sim,id=ipmi0 \
- -device virtio-rng-pci \
- -serial mon:stdio
diff --git a/scripts/run_in_container.sh b/scripts/run_in_container.sh
index 8b60bd6..0fd2731 100755
--- a/scripts/run_in_container.sh
+++ b/scripts/run_in_container.sh
@@ -1,4 +1,4 @@
#!/bin/bash
set -euo pipefail
-podman exec -it smalltown-dev $@
\ No newline at end of file
+podman exec -it nexantic-dev $@