arnaucube
arnaucube/configsPublic Self-hosted repository
configs/bin/box_profiles.sh
bin/box_profiles.shRaw
 1#!/usr/bin/env bash
 2#
 3# See `box` file for more details.
 4
 5profile_minimal() {
 6    apt-get install -y neovim git curl wget
 7}
 8
 9profile_rust() {
10    apt-get install -y neovim git curl build-essential
11    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
12}
13
14profile_nodejs() {
15    apt-get install -y curl
16    curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
17    apt-get install -y nodejs
18}
19
20profile_docker() {
21    apt-get install -y ca-certificates curl gnupg
22    install -m 0755 -d /etc/apt/keyrings
23    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
24    chmod a+r /etc/apt/keyrings/docker.gpg
25
26    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
27        https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
28        > /etc/apt/sources.list.d/docker.list
29
30    apt-get update
31    apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
32}
33
34profile_dev_env() {
35    git clone https://github.com/arnaucube/configs.git # includes rust
36    cd configs
37    yes | bash install-new-server.sh
38}
39
40profile_latex() {
41    sudo apt install latexmk
42    sudo apt install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
43}
44
45profile_default() {
46    profile_minimal
47    profile_nodejs
48    profile_docker
49    profile_ai
50    profile_dev_env # includes rust
51    profile_latex
52}