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
|
# Custom fish prompt
|
||||||
tee /home/vscode/.config/fish/conf.d/fish_greeting.fish > /dev/null <<EOF
|
tee /home/vscode/.config/fish/conf.d/fish_greeting.fish > /dev/null <<EOF
|
||||||
function fish_greeting
|
set fish_greeting
|
||||||
echo (set_color yellow)"Welcome! Press [enter] if you see a direnv error"
|
|
||||||
end
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Set ownership of fish directory to the vscode user
|
# Add direnv whitelist for the workspace directory
|
||||||
chown -R vscode:vscode /home/vscode/.config/fish
|
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",
|
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
|
||||||
"name": "Flux Cluster Template",
|
"name": "Flux Cluster Template",
|
||||||
"image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base",
|
"image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base",
|
||||||
"postCreateCommand": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh",
|
"postCreateCommand": {
|
||||||
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}"
|
"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
|
rm -rf .venv
|
||||||
fi
|
fi
|
||||||
task workstation:venv
|
task workstation:venv
|
||||||
|
|
||||||
# Export the direnv environment variables
|
|
||||||
task workstation:direnv
|
|
||||||
Reference in new issue
Block a user