This commit is contained in:
askiiart 2023-09-07 09:09:16 -05:00
commit 209fe77399
7 changed files with 125 additions and 6 deletions

View file

@ -0,0 +1,90 @@
# devcontainer settings
## Base settings
```json
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
"name": "askiiart <language>",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/<language>:1-1-bookworm",
"customizations": {
"vscode": {
"extensions": [
// Themes
"kokoscript.loopytheme",
"freebroccolo.theme-atom-one-dark",
"BeardedBear.beardedtheme",
// End themes
"AdrienTecher.just-cant-git-enough",
"codezombiech.gitignore",
"DavidAnson.vscode-markdownlint",
"dzhavat.git-cheatsheet",
"eamodio.gitlens",
"GitHub.copilot",
"GitHub.copilot-labs",
"GitHub.vscode-pull-request-github",
"Gruntfuggly.todo-tree",
"IJustDev.gitea-vscode",
"mhutchie.git-graph",
"VisualStudioExptTeam.intellicode-api-usage-examples",
"VisualStudioExptTeam.vscodeintellicode",
"wayou.vscode-todo-highlight",
"yzhang.markdown-all-in-one"
]
}
},
"mounts": [
"source=${localEnv:HOME}/.zshrc,target=/etc/zsh/zshrc,type=bind,consistency=cached",
"source=${localEnv:HOME}/.zkbd,target=/home/vscode/.zkbd,type=bind,consistency=cached",
"source=${localEnv:HOME}/.oh-my-zsh,target=/home/vscode/.oh-my-zsh,type=bind,consistency=cached"
]
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "gcc -v",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
```
## C++
Extensions:
```json
"danielpinto8zz6.c-cpp-compile-run",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools-themes",
"twxs.cmake",
```
## Rust
Extensions:
```json
"rust-lang.rust-analyzer",
"serayuzgur.crates",
```
## Python
Extensions:
```json
"ms-python.python",
"ms-python.black-formatter",
```
Image:
```json
"image": "mcr.microsoft.com/devcontainers/python:3",
```

View file

@ -31,7 +31,7 @@ elif command_exists "apk"; then
sudo apk add pass
sudo apk add git
else
echo "Unsupported: unknown package manager"
echo "Unsupported: unknown package manager and distro"
fi
# Check if GCM is installed

25
distro-specific.bash Normal file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e
if [ $(whoami) == "root" ]; then
echo "Run as a normal user, not root"
exit 1
fi
command_exists() { type "$1" &>/dev/null; }
if command_exists "apt-get"; then
;
elif command_exists "yum"; then
;
elif command_exists "pacman"; then
;
elif command_exists "zypp"; then
# Untested
;
elif command_exists "emerge"; then
;
elif command_exists "apk"; then
;
else
echo "Unsupported: unknown package manager and distro"
fi

View file

@ -25,6 +25,6 @@ elif command_exists "apk"; then
sudo rc-update add libvirtd
sudo rc-service libvirtd start
else
echo "Unsupported: unknown package manager"
echo "Unsupported: unknown package manager and distro"
fi

View file

@ -37,7 +37,7 @@ elif command_exists "emerge"; then
elif command_exists "apk"; then
PM="apk"
else
>&2 echo "Unsupported: unknown package manager"
>&2 echo "Unsupported: unknown package manager and distro"
exit 1
fi

@ -1 +1 @@
Subproject commit 00951bb4c4fdfbd28e0b28fc33a497eea5fdbe24
Subproject commit 8d03ad1c4799de6815ab943d2c6ac2cd35394e59

View file

@ -26,8 +26,12 @@ elif command_exists "emerge"; then
elif command_exists "apk"; then
sudo apk add zsh -y
else
echo >&2 "Unsupported: unknown package manager"
echo >&2 "Unsupported: unknown package manager and distro"
exit 1
fi
cp -r zsh-files/.* ~/
cp -r zsh-files/.oh-my-zsh ~/
cp -r zsh-files/.zkbd ~/
cp zsh-files/.zshrc ~/
chsh -s $(which zsh)