Update NixOS related. [ci skip]

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-06-13 03:45:34 +00:00
parent a114ab3ab6
commit 814d3b903e
7 changed files with 111 additions and 126 deletions

View File

@@ -15,7 +15,7 @@ LOG_FILE="${2:-complement_test_logs.jsonl}"
# A `.jsonl` file to write test results to
RESULTS_FILE="${3:-complement_test_results.jsonl}"
COMPLEMENT_BASE_IMAGE="${COMPLEMENT_BASE_IMAGE:-complement-conduwuit:main}"
COMPLEMENT_BASE_IMAGE="${COMPLEMENT_BASE_IMAGE:-complement-tuwunel:main}"
# Complement tests that are skipped due to flakiness/reliability issues or we don't implement such features and won't for a long time
SKIPPED_COMPLEMENT_TESTS='TestPartialStateJoin.*|TestRoomDeleteAlias/Parallel/Regular_users_can_add_and_delete_aliases_when_m.*|TestRoomDeleteAlias/Parallel/Can_delete_canonical_alias|TestUnbanViaInvite.*|TestRoomState/Parallel/GET_/publicRooms_lists.*"|TestRoomDeleteAlias/Parallel/Users_with_sufficient_power-level_can_delete_other.*'
@@ -35,20 +35,20 @@ toplevel="$(git rev-parse --show-toplevel)"
pushd "$toplevel" > /dev/null
if [ ! -f "complement_oci_image.tar.gz" ]; then
echo "building complement conduwuit image"
echo "building complement tuwunel image"
# if using macOS, use linux-complement
#bin/nix-build-and-cache just .#linux-complement
bin/nix-build-and-cache just .#complement
#nix build -L .#complement
echo "complement conduwuit image tar.gz built at \"result\""
echo "complement tuwunel image tar.gz built at \"result\""
echo "loading into docker"
docker load < result
popd > /dev/null
else
echo "skipping building a complement conduwuit image as complement_oci_image.tar.gz was already found, loading this"
echo "skipping building a complement tuwunel image as complement_oci_image.tar.gz was already found, loading this"
docker load < complement_oci_image.tar.gz
popd > /dev/null

View File

@@ -18,7 +18,7 @@ just() {
return
fi
# historical "conduit" store for compatibility purposes, same as conduwuit
# historical "conduit" store for compatibility purposes, same as tuwunel
nix run --inputs-from "$toplevel" attic -- \
login \
conduit \
@@ -52,26 +52,26 @@ just() {
withattic conduit || withattic conduit || withattic conduit || true
)
# main "conduwuit" store
# main "tuwunel" store
nix run --inputs-from "$toplevel" attic -- \
login \
conduwuit \
"${ATTIC_ENDPOINT:-https://attic.kennel.juneis.dog/conduwuit}" \
tuwunel \
"${ATTIC_ENDPOINT:-https://attic.kennel.juneis.dog/tuwunel}" \
"$ATTIC_TOKEN"
# Upload them to Attic (conduwuit store) and Cachix
# Upload them to Attic (tuwunel store) and Cachix
#
# Use `xargs` and a here-string because something would probably explode if
# several thousand arguments got passed to a command at once. Hopefully no
# store paths include a newline in them.
(
IFS=$'\n'
withattic conduwuit || withattic conduwuit || withattic conduwuit || true
withattic tuwunel || withattic tuwunel || withattic tuwunel || true
# push to cachix if available
if [ "$CACHIX_AUTH_TOKEN" ]; then
nix shell --inputs-from "$toplevel" cachix -c xargs \
cachix push conduwuit <<< "${cache[*]}"
cachix push tuwunel <<< "${cache[*]}"
fi
)
}

View File

@@ -31,7 +31,7 @@ let
"gzip_compression"
"zstd_compression"
# complement doesn't need hot reloading
"conduwuit_mods"
"tuwunel_mods"
# complement doesn't have URL preview media tests
"url_preview"
];
@@ -41,13 +41,13 @@ let
set -euxo pipefail
${lib.getExe' coreutils "env"} \
CONDUWUIT_SERVER_NAME="$SERVER_NAME" \
TUWUNEL_SERVER_NAME="$SERVER_NAME" \
${lib.getExe main'}
'';
in
dockerTools.buildImage {
name = "complement-conduwuit";
name = "complement-tuwunel";
tag = "main";
copyToRoot = buildEnv {
@@ -75,9 +75,9 @@ dockerTools.buildImage {
else [];
Env = [
"CONDUWUIT_TLS__KEY=${./private_key.key}"
"CONDUWUIT_TLS__CERTS=${./certificate.crt}"
"CONDUWUIT_CONFIG=${./config.toml}"
"TUWUNEL_TLS__KEY=${./private_key.key}"
"TUWUNEL_TLS__CERTS=${./certificate.crt}"
"TUWUNEL_CONFIG=${./config.toml}"
"RUST_BACKTRACE=full"
];