chore: add direnv whitelist directory to devincontainer

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2024-01-24 15:52:38 -05:00
1 parent 5d849727d8
commit b5a1a2fe79
3 files changed
+16 -10

No files matched your search

+10 -5
View File
@@ -62,10 +62,15 @@ EOF
# Custom fish prompt
tee /home/vscode/.config/fish/conf.d/fish_greeting.fish > /dev/null <<EOF
function fish_greeting
echo (set_color yellow)"Welcome! Press [enter] if you see a direnv error"
end
set fish_greeting
EOF
# Set ownership of fish directory to the vscode user
chown -R vscode:vscode /home/vscode/.config/fish
# Add direnv whitelist for the workspace directory
mkdir -p /home/vscode/.config/direnv
tee /home/vscode/.config/direnv/direnv.toml > /dev/null <<EOF
[whitelist]
prefix = [ "/workspaces" ]
EOF
# Set ownership vscode .config directory to the vscode user
chown -R vscode:vscode /home/vscode/.config
+6 -2
View File
@@ -2,6 +2,10 @@
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
"name": "Flux Cluster Template",
"image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base",
"postCreateCommand": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh",
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}"
"postCreateCommand": {
"setup": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh"
},
"postStartCommand": {
"git": "git config --global --add safe.directory ${containerWorkspaceFolder}"
}
}
-3
View File
@@ -17,6 +17,3 @@ if ! grep -q "venv /workspaces/" .venv/pyvenv.cfg; then
rm -rf .venv
fi
task workstation:venv
# Export the direnv environment variables
task workstation:direnv