chore: add direnv whitelist directory to devincontainer
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
3 files changed
+16
-10
No files matched your search
@@ -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
|
||||
@@ -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}"
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Reference in new issue
Block a user