Skip to content

Commit ee4404f

Browse files
committed
Start at HavocAI
1 parent 9fa766f commit ee4404f

File tree

10 files changed

+213
-152
lines changed

10 files changed

+213
-152
lines changed

.github/workflows/install-ci.yml

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,7 @@ jobs:
2020
with:
2121
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
2222
- name: Install
23-
run: |
24-
mkdir -p ~/.ssh
25-
chmod 700 ~/.ssh
26-
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
27-
chmod 600 ~/.ssh/id_rsa
28-
# Update known hosts within the container (recommended)
29-
echo -e "${GREEN}Update known hosts${NC}"
30-
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
31-
32-
docker run --rm \
33-
-v ${{ github.workspace }}:/workspace \
34-
-v ~/.ssh:/home/builduser/.ssh \
35-
-e SSH_AUTH_SOCK=/ssh-agent \
36-
manjarolinux/base:latest \
37-
/bin/bash -c "
38-
echo -e '${GREEN}Install openssh and git${NC}'
39-
pacman -Sy --noconfirm openssh git go && \
40-
echo -e '${GREEN}Add /workspace to trusted repos${NC}'
41-
git config --global --add safe.directory /workspace && \
42-
echo -e '${GREEN}Create builduser${NC}' && \
43-
useradd builduser -m && \
44-
passwd -d builduser && \
45-
printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers && \
46-
chown builduser:builduser -R /home/builduser && \
47-
echo -e '${GREEN}Start install${NC}' && \
48-
cd /workspace && \
49-
sudo -u builduser ./install.sh
50-
"
23+
run: ./install.sh
5124
devcontainer:
5225
runs-on: ${{ matrix.os }}
5326
strategy:
@@ -60,5 +33,5 @@ jobs:
6033
- uses: webfactory/[email protected]
6134
with:
6235
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
63-
- name: install
36+
- name: Install
6437
run: ./install.sh

config/nvim/lazyvim.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"news": {
1313
"NEWS.md": "10960"
1414
},
15-
"version": 8
15+
"version": 7
1616
}

home/dot-exports

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ if [[ "$unamestr" == 'Darwin' ]]; then
1818
fi
1919

2020
path+=($HOME/.local/bin $HOME/.npm-global/bin $HOME/.rvm/bin $path)
21+
[ $(which go) != "" ] && path+=$(go env GOPATH)/bin
22+
[ -d $HOME/.local/balena ] && path+=$HOME/.local/balena/bin
2123
export PATH
2224
export ROS_DOMAIN_ID="3"
2325
export GPG_TTY=$(tty)

home/dot-gitconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[user]
22
name = Erich L Foster
33
4-
# signingkey = 08A7E764EC1713A9
4+
signingkey = 08A7E764EC1713A9
5+
[includeIf "gitdir:~/workspace/HavocAI/"] # job needs, like workspace/* so all included projects
6+
path = .gitconfig-havoc
57
[core]
68
editor = nvim
79
autocrlf = input

home/dot-gitconfig-havoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[user]
2+
name = Erich L Foster
3+
4+
signingkey = 0541CB2AB0E97F1D
5+
[core]
6+
sshCommand = ssh -i ~/.ssh/id_ed25519-havoc
7+

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ case "$kernel" in
1616
./scripts/main.sh
1717
fi
1818
;;
19-
*"MANJARO"* )
19+
*"generic"* )
2020
if [[ $DEV_WORKSPACE != "" ]]; then
2121
./scripts/devcontainer.sh
2222
else

scripts/base_install.sh

Lines changed: 67 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,75 @@
11
function base_install() {
2-
echo "Setting up yay..."
3-
[ ! -d /tmp/yay ] && git clone https://aur.archlinux.org/yay.git /tmp/yay
4-
cd /tmp/yay
5-
makepkg -si --noconfirm
6-
cd -
7-
8-
echo "Setting up shell..."
9-
pac_install \
2+
local system="$1"
3+
4+
if [[ "$system" == "arch" ]]; then
5+
INFO "Setting up an arch based system"
6+
if [ $(which yay) == "" ]; then
7+
INFO "Setting up yay..."
8+
[ ! -d /tmp/yay ] && git clone https://aur.archlinux.org/yay.git /tmp/yay
9+
cd /tmp/yay
10+
makepkg -si --noconfirm
11+
cd -
12+
else
13+
INFO "yay already installed"
14+
fi
15+
16+
pkg_install="pac_install"
17+
alt_install="yay_install"
18+
NEOVIM="neovim"
19+
GO="go"
20+
else
21+
INFO "Setting up an ubuntu based system"
22+
23+
pkg_install="apt_install"
24+
alt_install="snap_install"
25+
NEOVIM="nvim --classic"
26+
GO="go --classic"
27+
fi
28+
29+
INFO "Setting up shell..."
30+
$pkg_install \
1031
btop \
1132
curl \
1233
fzf \
1334
iftop \
1435
pass \
15-
python \
16-
python-pip \
36+
python3 \
37+
python3-pip \
1738
tmux \
1839
wget
1940

41+
# install fonts
42+
mkdir -p "$HOME/.local/bin"
43+
curl -fsSL https://raw.githubusercontent.com/getnf/getnf/main/install.sh | bash
44+
"$HOME/.local/bin/getnf" -i DejaVuSansMono,DroidSansMono,Hack,Recursive,RobotoMono | true # don't fail on fonts
45+
2046
zsh_extras
2147

2248
starship_install
2349

2450
lazygit_install
2551

26-
echo "Setting up networking..."
27-
pac_install \
28-
openssh
29-
30-
echo "Installing developer tools..."
52+
INFO "Installing developer tools..."
3153
if [ ! -d "$HOME/workspace" ]; then
3254
mkdir -p "$HOME/workspace"
3355
fi
3456

35-
pac_install \
57+
$pkg_install \
3658
cmake \
3759
gcc \
3860
llvm \
39-
python-setuptools
40-
41-
yay_install \
42-
dust \
43-
git-completion \
44-
lazydocker
45-
46-
echo "Installing NEOVIM..."
47-
pac_install \
48-
chafa \
49-
git-lfs \
50-
go \
51-
neovim \
61+
python3-setuptools
62+
63+
INFO "Installing NEOVIM..."
64+
rust_install
65+
$alt_install $GO
66+
$alt_install $NEOVIM
67+
68+
$pkg_install \
5269
nodejs \
5370
npm \
54-
python-debugpy \
55-
python-gitpython \
56-
python-pynvim \
57-
python-ply \
58-
python-ruff \
59-
python-virtualenv \
60-
python-yaml \
61-
rust \
71+
python3-debugpy \
72+
python3-virtualenv \
6273
xclip
6374

6475
mkdir -p "$HOME/.npm-global"
@@ -68,13 +79,27 @@ function base_install() {
6879

6980
npm install -g @devcontainers/cli
7081

71-
echo "Setting up docker..."
72-
pac_install \
82+
INFO "Setting up docker..."
83+
$pkg_install \
7384
ca-certificates \
74-
containerd \
75-
docker \
76-
docker-compose \
7785
gnupg
86+
if [ $system == "arch" ]; then
87+
DOCKER_PACKAGES="containerd docker docker-compose"
88+
else
89+
$pkg_install \
90+
apt-transport-https \
91+
ca-certificates \
92+
curl \
93+
software-properties-common
94+
95+
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
96+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
97+
98+
apt_update
99+
DOCKER_PACKAGES="containerd.io docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin"
100+
fi
101+
102+
$pkg_install $DOCKER_PACKAGES
78103

79104
sudo usermod -a -G docker "$USER"
80105
if [ ! "$CI" ]; then

0 commit comments

Comments
 (0)