refactor: use hostname instead of variable

This commit is contained in:
Job
2025-09-01 10:26:07 +02:00
parent e0f953b94e
commit 4004417aa5
3 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ export EDITOR=nvim \
XDG_RUNTIME_DIR=/run/user/1000 \
SSH_AUTH_SOCK=/run/user/1000/ssh-auth-sock \
DBUS_SESSION_BUS_ADDRESS="unix:path=/tmp/bus" \
PS1="\[\e[30;46m\] $CONTAINER_NAME | \w \[\e[0;36m\]\[\e[m\] " \
PS1="\[\e[30;46m\] \h | \w \[\e[0;36m\]\[\e[m\] " \
TZ="Europe/Amsterdam"
# === aliases and functions ===

View File

@@ -1,3 +1,3 @@
for dir in "Code" "Downloads" ".config/devcontainer"; do
for dir in "Code" "Documents" "Downloads" ".config/devcontainer"; do
arg "-v $HOME/$dir:/home/user/$dir"
done

View File

@@ -13,6 +13,7 @@ arg() { echo -n " $@"; }
# starting a new container.
run_args() {
arg "--name $name"
arg "--hostname $name"
# Disable some security settings so host directories can
# be mounted without problems.
@@ -23,7 +24,6 @@ run_args() {
# container.
[ -e "/run/user/$UID/bus" ] && arg "-v /run/user/$UID/bus:/tmp/bus" # Use host dbus.
arg "-e HOST_HOME=$HOME" # Used to translate container path to host.
arg "-e CONTAINER_NAME=$name"
# Use host networking.
arg "--net=host"