diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2507829..81f75dc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,7 +13,10 @@ "url": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainerFeature.schema.json" } ] - } + }, + "extensions": [ + "tamasfe.even-better-toml" + ] } }, "updateContentCommand": "npm install -g @devcontainers/cli" diff --git a/images/base/.devcontainer/Dockerfile b/images/base/.devcontainer/Dockerfile index 775b428..c1e7e9f 100644 --- a/images/base/.devcontainer/Dockerfile +++ b/images/base/.devcontainer/Dockerfile @@ -75,6 +75,7 @@ RUN { echo && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[0 COPY --chown=vscode:vscode bash_aliases .bash_aliases COPY --chown=vscode:vscode gitconfig .config/git/config +COPY --chown=vscode:vscode direnv.toml .config/direnv/direnv.toml # Custom PATH additions ENV PATH=$HOME/.local/bin:$PATH diff --git a/images/base/.devcontainer/devcontainer.json b/images/base/.devcontainer/devcontainer.json index e43a098..75ab023 100644 --- a/images/base/.devcontainer/devcontainer.json +++ b/images/base/.devcontainer/devcontainer.json @@ -24,7 +24,6 @@ "shutdownAction": "stopContainer", "remoteUser": "vscode", "postCreateCommand": { - "docker-completion": "docker completion bash | sudo tee -a /etc/bash_completion.d/docker > /dev/null", - "direnv": "direnv allow || true" + "docker-completion": "docker completion bash | sudo tee -a /etc/bash_completion.d/docker > /dev/null" } } diff --git a/images/base/.devcontainer/direnv.toml b/images/base/.devcontainer/direnv.toml new file mode 100644 index 0000000..7a1a783 --- /dev/null +++ b/images/base/.devcontainer/direnv.toml @@ -0,0 +1,20 @@ +# Copyright 2023 Simon Emms +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Documentation +# @link https://direnv.net/man/direnv.toml.1.html + +[whitelist] +# Automatically apply all .envrc files under /workspaces +prefix = ["/workspaces"]