Skip to content

Commit

Permalink
more features
Browse files Browse the repository at this point in the history
  • Loading branch information
cirolosapio committed Oct 2, 2023
1 parent 1a098bf commit 2df0982
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 5 deletions.
7 changes: 7 additions & 0 deletions src/alpine-bat/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "alpine-bat",
"id": "alpine-bat",
"version": "0.0.1",
"description": "Installs bat on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-bat"
}
10 changes: 10 additions & 0 deletions src/alpine-bat/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

echo "Activating feature 'alpine-bat'"

apk --no-cache add bat
echo "alias cat='bat'" >> $_CONTAINER_USER_HOME/.profile

echo 'Done!'
1 change: 0 additions & 1 deletion src/alpine-gh-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -e

echo "Activating feature 'alpine-gh-cli'"

# apk --no-cache add github-cli --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
apk --no-cache add github-cli

echo 'Done!'
7 changes: 7 additions & 0 deletions src/alpine-nano/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "alpine-nano",
"id": "alpine-nano",
"version": "0.0.1",
"description": "Installs nano on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-nano"
}
9 changes: 9 additions & 0 deletions src/alpine-nano/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

echo "Activating feature 'alpine-nano'"

apk --no-cache add nano

echo 'Done!'
11 changes: 9 additions & 2 deletions src/alpine-nushell/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"name": "alpine-nushell",
"id": "alpine-nushell",
"version": "0.0.1",
"version": "0.0.2",
"description": "Installs nushell on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-nushell"
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-nushell",
"options": {
"initStarship": {
"type": "boolean",
"default": true,
"description": "Init starship"
}
}
}
7 changes: 5 additions & 2 deletions src/alpine-nushell/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ mkdir -p $_CONTAINER_USER_HOME/.config/nushell/
wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_config.nu -O $_CONTAINER_USER_HOME/.config/nushell/config.nu
wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_env.nu -O $_CONTAINER_USER_HOME/.config/nushell/env.nu

echo $'\nmkdir ~/.cache/starship\nstarship init nu | save -f ~/.cache/starship/init.nu' >> $_CONTAINER_USER_HOME/.config/nushell/env.nu
echo $'\nsource ~/.cache/starship/init.nu' >> $_CONTAINER_USER_HOME/.config/nushell/config.nu

if [[ $INITSTARSHIP == "true" ]]; then
echo $'\nmkdir ~/.cache/starship\nstarship init nu | save -f ~/.cache/starship/init.nu' >> $_CONTAINER_USER_HOME/.config/nushell/env.nu
echo $'\nsource ~/.cache/starship/init.nu' >> $_CONTAINER_USER_HOME/.config/nushell/config.nu
fi

echo 'Done!'
14 changes: 14 additions & 0 deletions src/alpine-ohmyzsh/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "alpine-ohmyzsh",
"id": "alpine-ohmyzsh",
"version": "0.0.1",
"description": "Installs ohmyzsh on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-ohmyzsh",
"options": {
"initStarship": {
"type": "boolean",
"default": true,
"description": "Init starship"
}
}
}
19 changes: 19 additions & 0 deletions src/alpine-ohmyzsh/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

set -e

echo "Activating feature 'alpine-ohmyzsh'"

apk --no-cache add git curl zsh
curl -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh -s

git clone https://github.com/supercrabtree/k $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/k
git clone https://github.com/zsh-users/zsh-autosuggestions $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
sed -i 's/plugins=(git)/plugins=(git sudo k zsh-autosuggestions zsh-syntax-highlighting)/' $_CONTAINER_USER_HOME/.zshrc

if [[ $INITSTARSHIP == "true" ]]; then
echo $'\neval "$(starship init zsh)"' >> $_CONTAINER_USER_HOME/.zshrc
fi

echo 'Done!'
7 changes: 7 additions & 0 deletions src/alpine-starship/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "alpine-starship",
"id": "alpine-starship",
"version": "0.0.1",
"description": "Installs starship on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-starship"
}
9 changes: 9 additions & 0 deletions src/alpine-starship/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

echo "Activating feature 'alpine-starship'"

apk --no-cache add starship --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community

echo 'Done!'

0 comments on commit 2df0982

Please sign in to comment.