loadkeys jp106
Check if in efi mode: ls /sys/firmware/efi/efivars (should execute without error)
timedatectl set-ntp true
List devices: fdisk -l
fdisk /dev/sda (or whichever device is to be used)
1G for boot
4G swap
Rest to root partition
mkfs.vfat /dev/boot_partition -n BOOT
mkswap /dev/swap_partition -L SWAP
mkfs.ext4 /dev/root_partition -L ROOT
mount /dev/root_partition /mnt
mkdir /mnt/boot
mount /dev/boot_partition /mnt/boot
swapon /dev/swap_partition
reflector --verbose --protocol https --latest 50 --sort rate --save /etc/pacman.d/mirrorlist
pacstrap /mnt base base-devel linux-lts linux-lts-headers nvidia-dkms linux-firmware bash-completion vim nano dhcpcd
Fstab:
genfstab -U /mnt >> /mnt/etc/fstab
Chroot:
arch-chroot /mnt
Remove the annoying beeping sound with rmmod pcspkr.
Time:
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
hwclock --systohc
Localization:
Uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen and then run locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
echo "KEYMAP=jp106" >> /etc/vconsole.conf
Network configuration (change myhostname to a proper name):
echo "myhostname" >> /etc/hostname
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 myhostname.localdomain myhostname" >> /etc/hosts
systemctl enable dhcpcd
Set root password: passwd
Install more packages:
(Replace amd-ucode by intel-ucode depending on the cpu brand)\
sudo pacman -S amd-ucode wget git exa htop nvtop bat mlocate
(Use the updatedb command to create the locate database)
pacman -S grub efibootmgr
mkdir /boot/efi
mount /dev/sda1 /boot/efi
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
pacman -S sudo
groupadd sudo
EDITOR=vim visudo
--> uncomment sudo ALL=(ALL) ALL
Add a sudo user:
useradd -m hoel
usermod -aG sudo hoel
passwd hoel
pacman -S openssh
systemctl enable sshd.service
chrome firefox, etc...
Don't install all the KDE bloatware
Must be done as a normal sudo user.
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
sudo rm -r yay
pacman -S noto-fonts adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts adobe-source-code-pro-fonts ttf-roboto ttf-dejavu ttf-liberation
sudo pacman -S emacs
git clone --single-branch --branch develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
sudo pacman -S zsh neofetch
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
In ~/.oh-my-zsh/lib/misc.zsh, change:
env_default 'LESS' '-R' (when using git diff (or other similar commands), shows results in an alternate screen)
to:
env_default 'LESS' '-FRSX' ("Usual" console output)
mkdir temp_fonts
cd temp_fonts
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
sudo mv *.ttf /usr/share/fonts/
cd ..
rmdir temp_fonts
yay -S --noconfirm zsh-theme-powerlevel10k-git
echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrc
git clone --separate-git-dir=$HOME/.dotfiles git@github.com:hoel-bagard/.dotfiles.git $HOME/myconf-tmp --recurse-submodules
mv -v ~/myconf-tmp/.* ~/
mv -v ~/myconf-tmp/README.md ~/
rmdir myconf-tmp
source .zshrc
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
source .zshrc