Skip to content

Commit 9808e70

Browse files
committed
Update to new NAS
1 parent b59d10b commit 9808e70

File tree

4 files changed

+116
-166
lines changed

4 files changed

+116
-166
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ case "$kernel" in
2323
./scripts/main.sh
2424
fi
2525
;;
26-
*"qnap"* )
26+
*"cachyos"* )
2727
./scripts/nas.sh
2828
;;
2929
*)

scripts/base_install.sh

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
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 \
10+
btop \
11+
curl \
12+
fzf \
13+
iftop \
14+
pass \
15+
python \
16+
python-pip \
17+
tmux \
18+
wget
19+
20+
zsh_extras
21+
22+
starship_install
23+
24+
lazygit_install
25+
26+
echo "Setting up networking..."
27+
pac_install \
28+
openssh
29+
30+
echo "Installing developer tools..."
31+
if [ ! -d "$HOME/workspace" ]; then
32+
mkdir -p "$HOME/workspace"
33+
fi
34+
35+
pac_install \
36+
cmake \
37+
gcc \
38+
llvm \
39+
python-setuptools
40+
41+
yay_install \
42+
git-completion
43+
44+
echo "Installing NEOVIM..."
45+
pac_install \
46+
chafa \
47+
git-lfs \
48+
go \
49+
neovim \
50+
nodejs \
51+
npm \
52+
python-gitpython \
53+
python-pynvim \
54+
python-ply \
55+
python-virtualenv \
56+
python-yaml \
57+
rust \
58+
xclip
59+
60+
pip3 install debugpy ruff
61+
62+
mkdir -p "$HOME/.npm-global"
63+
npm config set prefix "$HOME/.npm-global"
64+
npm install -g neovim tree-sitter
65+
curl -sSL https://get.rvm.io | bash -s -- --auto-dotfiles
66+
67+
npm install -g @devcontainers/cli
68+
69+
echo "Setting up docker..."
70+
pac_install \
71+
ca-certificates \
72+
containerd \
73+
docker \
74+
docker-compose \
75+
gnupg
76+
77+
sudo usermod -a -G docker "$USER"
78+
if [ ! "$CI" ]; then
79+
sudo systemctl daemon-reload
80+
sudo systemctl enable docker
81+
sudo systemctl start docker
82+
fi
83+
84+
echo "net.core.rmem_max=26214400" | sudo tee /etc/sysctl.d/10-udp-buffer-sizes.conf
85+
echo "net.core.rmem_default=26214400" | sudo tee -a /etc/sysctl.d/10-udp-buffer-sizes.conf
86+
}

scripts/main.sh

Lines changed: 16 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,26 @@ cd "$(dirname "$0")/.."
66
DOTFILES_DIR=$(pwd)
77

88
source "$DOTFILES_DIR/scripts/utils.sh"
9+
source "$DOTFILES_DIR/scripts/base_install.sh"
910

1011
print_details
1112

1213
THIS=$0
1314

14-
pac_install base-devel dialog git stow
15+
pac_install \
16+
base-devel \
17+
dialog \
18+
git \
19+
stow \
20+
zsh
1521

1622
############################# grab dotfiles ####################################
1723
# dotfiles already exist since I am running this script!
1824
# git clone [email protected]:erichlf/dotfiles.git
1925
git submodule update --init --recursive
2026

27+
sudo usermod -s $(which zsh) $(whoami)
28+
2129
cmd=(
2230
dialog
2331
--clear
@@ -49,128 +57,24 @@ function run_me() {
4957
############################# my base system ###################################
5058
#bikeshed contains utilities such as purge-old-kernels
5159
function base_sys() {
52-
echo "Updating system..."
53-
sudo pacman -Syu --noconfirm
54-
55-
echo "Setting up yay..."
56-
57-
[ ! -d /tmp/yay ] && git clone https://aur.archlinux.org/yay.git /tmp/yay
58-
cd /tmp/yay
59-
makepkg -si --noconfirm
60-
cd -
61-
62-
echo "Setting up shell..."
60+
echo "Installing base system"
61+
base_install
6362

63+
echo "Installing extras..."
6464
pac_install \
65-
btop \
66-
curl \
67-
fzf \
6865
gnome-shell-extension-appindicator \
6966
gnome-tweaks \
7067
gtk3 \
7168
guake \
72-
iftop \
73-
pass \
74-
python \
75-
python-pip \
76-
tmux \
77-
wget
69+
meld \
70+
networkmanager-openvpn \
71+
networkmanager-vpnc \
72+
obsidian
7873

7974
guake --restore-preferences "$DOTFILES_DIR/guake.conf"
8075
gnome-extensions enable [email protected]
8176
gnome-extensions enable [email protected]
8277

83-
zsh_extras
84-
85-
starship_install
86-
87-
lazygit_install
88-
89-
echo "Setting up networking..."
90-
pac_install \
91-
networkmanager-openvpn \
92-
networkmanager-vpnc \
93-
openssh
94-
95-
echo "Installing developer tools..."
96-
if [ ! -d "$HOME/workspace" ]; then
97-
mkdir "$HOME/workspace"
98-
fi
99-
100-
pac_install \
101-
cmake \
102-
gcc \
103-
ipython \
104-
llvm \
105-
meld \
106-
obsidian \
107-
python-matplotlib \
108-
python-numpy \
109-
python-scipy \
110-
python-setuptools
111-
112-
yay_install \
113-
git-completion
114-
115-
echo "Installing python linters..."
116-
pac_install \
117-
python-black \
118-
flake8 \
119-
python-isort \
120-
python-pylint \
121-
python-wheel \
122-
yapf
123-
124-
echo "Installing NEOVIM..."
125-
pac_install \
126-
chafa \
127-
git-lfs \
128-
go \
129-
neovim \
130-
nodejs \
131-
npm \
132-
python-gitpython \
133-
python-pynvim \
134-
python-ply \
135-
python-virtualenv \
136-
python-yaml \
137-
rust \
138-
xclip
139-
140-
mkdir -p "$HOME/.npm-global"
141-
npm config set prefix "$HOME/.npm-global"
142-
npm install -g neovim tree-sitter
143-
curl -sSL https://get.rvm.io | bash -s -- --auto-dotfiles
144-
145-
echo "Setting up docker..."
146-
147-
pac_install \
148-
ca-certificates \
149-
containerd \
150-
docker \
151-
docker-compose \
152-
gnupg
153-
154-
sudo usermod -a -G docker "$USER"
155-
if [ ! "$CI" ]; then
156-
sudo systemctl daemon-reload
157-
sudo systemctl enable docker
158-
sudo systemctl start docker
159-
fi
160-
161-
echo "Installing vscode..."
162-
npm install -g @devcontainers/cli
163-
164-
yay_install \
165-
git-credential-manager \
166-
visual-studio-code-bin
167-
168-
git-credential-manager configure
169-
170-
echo "net.core.rmem_max=26214400" | sudo tee /etc/sysctl.d/10-udp-buffer-sizes.conf
171-
echo "net.core.rmem_default=26214400" | sudo tee -a /etc/sysctl.d/10-udp-buffer-sizes.conf
172-
173-
echo "Installing extras..."
17478
yay_install \
17579
1password \
17680
1password-cli \

scripts/nas.sh

Lines changed: 13 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,68 +8,28 @@ cd $(dirname $0)/..
88
DOTFILES_DIR=$(pwd)
99

1010
source "$DOTFILES_DIR/scripts/utils.sh"
11+
source "$DOTFILES_DIR/scripts/base_install.sh"
1112

1213
print_details
1314

14-
git submodule init
15-
git submodule update
16-
17-
if [[ $JUNEST_ENV -ne 1 ]]; then
18-
INFO "Installing busybox..."
19-
sudo busybox --install /opt/bin/
20-
21-
INFO "Installing zsh..."
22-
sudo opkg install \
23-
zsh
24-
fi
15+
pac_install \
16+
base-devel \
17+
dialog \
18+
git \
19+
stow
2520

26-
INFO "Installing JuNest..."
27-
[[ ! -d $HOME/.local/share/junest ]] && git clone https://github.com/fsquillace/junest.git $HOME/.local/share/junest
28-
[[ ! -d $HOME/.junest ]] && junest setup
21+
############################# grab dotfiles ####################################
22+
# dotfiles already exist since I am running this script!
23+
# git clone [email protected]:erichlf/dotfiles.git
24+
git submodule update --init --recursive
2925

30-
[[ $JUNEST_ENV -ne 1 ]] && [[ -d .local/share/junest ]] && ./.local/share/junest/bin/junest -b "--bind /share /share"
26+
sudo usermod -s $(which zsh) $(whoami)
3127

3228
pac_update
3329

34-
INFO "Installing stow..."
35-
pac_install \
36-
stow
37-
3830
sym_links
3931

4032
INFO "Installing base system..."
41-
pac_install \
42-
btop \
43-
curl \
44-
docker \
45-
fzf \
46-
gzip \
47-
iftop \
48-
openssh \
49-
python \
50-
python-pip \
51-
tar \
52-
tmux \
53-
wget \
54-
zsh
55-
56-
zsh_extras
57-
58-
starship_install
59-
60-
INFO "Installing neovim..."
61-
pac_install \
62-
chafa \
63-
git-lfs \
64-
go \
65-
neovim \
66-
nodejs \
67-
npm \
68-
python-gitpython \
69-
python-pynvim \
70-
python-ply \
71-
python-virtualenv \
72-
python-yaml \
73-
rust
33+
base_install
7434

75-
INFO "Finished setting up system..."
35+
INFO "Finished setting up system."

0 commit comments

Comments
 (0)