Last active
July 30, 2018 09:00
-
-
Save yf-hk/10f065aee89cb36c403957d89278ea63 to your computer and use it in GitHub Desktop.
Setup Raspberry Pi with Arch ARM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sed -i 's/#en_US\.UTF-8 UTF-8/en_US\.UTF-8 UTF-8/g' /etc/locale.gen | |
locale-gen | |
sed -i '/gpu_mem=/s/=64$/=128/g' /boot/config.txt | |
echo 'dtparam=audio=on' >> /boot/config.txt | |
echo 'start_file=start_x.elf' >> /boot/config.txt | |
echo 'fixup_file=fixup_x.dat' >> /boot/config.txt | |
echo 'disable_camera_led=1' >> /boot/config.txt | |
echo 'bcm2835-v4l2' > /etc/modules-load.d/rpi-camera.conf | |
echo 'options bcm2835-v4l2 max_video_width=3240 max_video_height=2464' > /etc/modprobe.d/rpi-camera.conf | |
wifi-menu -o | |
netctl start `ls /etc/netctl/wlan0-* | xargs -n1 basename` | |
pacman-key --init | |
pacman-key --populate archlinuxarm | |
pacman -Syu zsh powerline-fonts htop git base-devel go python python-pip nodejs npm neovim python-neovim ffmpeg gpac nmap wiringpi screen wpa_actiond --noconfirm | |
#pacman -Syu gstreamer gst-libav gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly mencoder vlc | |
pacman -Rnsu vi --noconfirm | |
systemctl enable netctl-auto@wlan0 | |
sed -i '/# %wheel ALL=(ALL) NOPASSWD: ALL/s/^# //g' /etc/sudoers | |
git clone https://aur.archlinux.org/yay.git | |
cd yay | |
chown -R alarm:alarm . | |
sudo -u alarm makepkg -si --noconfirm | |
cd .. | |
rm -rf yay | |
echo 'alias apacman="sudo -u alarm yay --noconfirm"' >> ~/.zshrc | |
sudo -u alarm yay -S raspi-config neovim-drop-in --noconfirm | |
pacman -Sc --noconfirm | |
sh -c "$(curl -fsSL http://install.ohmyz.sh)" | |
sed -i '/# export PATH=\$HOME\/bin:\/usr\/local\/bin:\$PATH/s/\$HOME\/bin:\/usr\/local\/bin:\$PATH/$PATH:\/opt\/vc\/bin/g' ~/.zshrc | |
sed -i '/# export PATH=\$PATH:\/opt\/vc\/bin/s/# //g' ~/.zshrc | |
sed -i '/^ export /s/^ //g' ~/.zshrc | |
sed -i '/ZSH_THEME="robbyrussell"/s/robbyrussell/agnoster/g' ~/.zshrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment