dev container and git config

This commit is contained in:
2026-10-09 06:19:05 +02:00
parent 596b5873e6
commit 99422bc415
3 changed files with 35 additions and 5 deletions
+25 -4
View File
@@ -11,8 +11,9 @@ export DEV_USER="$(basename "$DEV_HOME")"
# Software directories
# -----------------------------------------------------------------------------
mkdir -p /opt/rustup /opt/cargo /opt/aseprite
chown "$DEV_USER:$DEV_USER" /opt/rustup /opt/cargo /opt/aseprite
mkdir -p /opt/rustup /opt/cargo /opt/aseprite /opt/dx /opt/npm-global
chown -R "$DEV_USER:$DEV_USER" /opt/rustup /opt/cargo /opt/aseprite /opt/dx /opt/npm-global
# TODO basically all commamd from here on need to run as $DEV_USER, but scrpt runs as root
# -----------------------------------------------------------------------------
# Fish configuration
@@ -50,7 +51,7 @@ fi
# Rust toolchain
echo "Installing stable Rust toolchain..."
/opt/cargo/bin/rustup default stable
/opt/cargo/bin/rustup default nightly
# Fish completions
echo "Installing rustup Fish completion..."
@@ -59,6 +60,23 @@ echo "Installing rustup Fish completion..."
| tee /etc/fish/completions/rustup.fish >/dev/null
# Dioxus CLI
export DX_INSTALL=/opt/dx
if [[ ! -x /opt/cargo/bin/dx ]]; then
echo "Installing dioxus cli..."
# TODO needs to run as user, not root
curl -sSL https://dioxus.dev/install.sh | bash
else
echo "dioxus cli is already installed."
fi
# -----------------------------------------------------------------------------
# NodeJS and NPM
# -----------------------------------------------------------------------------
npm config set prefix '/opt/npm-global'
# -----------------------------------------------------------------------------
# Aseprite
# -----------------------------------------------------------------------------
@@ -155,7 +173,10 @@ for binary in \
rust-gdb \
rust-gdbgui \
rust-lldb \
rustup
rustup \
dx \
npm \
node
do
export_bin "$binary"
done