Skip to content

moecasts/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation Guide

# Connect to the internet
## if you are using wifi, please run the following command
wifi-menu
## else
dhcpcd

# Update the system clock
timedatectl set-ntp true

# Partition the disks
## if your block device is nvme0n1
## follow the tips to partition the disk
cfdisk /dev/nvme0n1

## list the partition
fdisk -l

# Format the partitions
mkfs.ext4 /dev/nvme0n1pX

# Mount the file systems
mount /dev/nvme0n1pX /mnt
mkdir /mnt/boot

## nvme0n1pY is the EFI partition
mount /dev/nvme0n1pY /mnt/boot

# Select the mirrors
## write the mirrors you want at the top of the file
vim /etc/pacman.d/mirrorlist

# Install essential packages:qwq
pacstrap /mnt base base-devel linux linux-firmware

# Fstab
## Generate an fstab file (use -U or -L to define by UUID or labels, respectively)
genfstab -U /mnt >> /mnt/etc/fstab

## Check the resulting /mnt/etc/fstab file, and edit it in case of errors
cat /mnt/etc/fstab

# Chroot
arch-chroot /mnt

# Time zone
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

# Install the nesscery packages
## gvim support system clipboard.
pacman -S gvim dialog wpa_supplicant networkmanager dhcpcd

# Localization
## uncomment en_US.UTF-8 UTF-8 and other needed locales
vim /etc/locale.gen
# generate the locales
locale-gen

## Create the locale.conf file, and set the LANG variable accordingly
echo "LANG=en_US.UTF-8" >> /etc/locale.conf

# Network configuration
## Create the hostname file
echo "myhostnane" >> /etc/hostname

## Add matching entries to hosts
vim /etc/hosts
### add following content at the tail
127.0.0.1	localhost
::1		localhost
127.0.0.1	myhostname.localdomain	myhostname

# Root password
passwd

# Microcode
pacman -S intel-ucode # if you are using intel cpu
pacman -S amd-ucode # if you are using amd cpu

# Boot loader
pacman -S os-prober ntfs-3g grub efibootmgr
## install grub.(bootloader-id can be set what you want)
grub-install --efi-directory=/boot --bootloader-id=ARCH
grub-mkconfig -o /boot/grub/grub.cfg

# Roboot
exit
umount /mnt/boot
umount /mnt
reboot

Setup

Beep

# temporary
## disable
rmmod pcspkr 
## enable
modprobe pcspk

# forever
echo "rmmod pcspkr" >> /etc/profile

Swap

sudo fallocate -l 4G /swapfile

sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo vim /etc/fstab

# add to the end
/swapfile none swap defaults 0 0

Create User

# set the the username what you want
useradd -m -G wheel username
# set password
passwd username

# config sudo
## uncomment %wheel ALL=(ALL)ALL
visudo

# reboot

Mirrors

sudo vim /etc/pacman.conf
# uncomment
[multilib]
Include = /etc/pacman.d/mirrorlist

# add
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
# write and exit :wq

# update
sudo pacman -Syy
sudo pacman -S archlinuxcn-keyring

Install basic tools

sudo pacman -S zsh git wget yay

# change aururl
yay --aururl "https://aur.tuna.tsinghua.edu.cn" --save

Desktop environment

Xorg

# Driver installation
## lspci | grep -e VGA -e 3D
lspci | grep -e VGA -e 3D
## show list of open-source video drivers
pacman -Ss xf86-video
## install your video drivers
### intel
sudo pacman -S xf86-video-intel
### amdgpu
sudo pacman -S xf86-video-amdgpu

# Xorg installation
sudo pacman -S xorg

ALSA

sudo pacman -S alsa-utils

Lightdm

sudo pacman -S lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings numlockx
# test
lightdm --test-mode --debug
# auto start
sudo systemctl enable lightdm

i3

sudo pacman -S i3 polybar picom rofi

i3lock-fancy

yay -S i3lock-fancy-git

Network

# install
sudo pacman -S networkmanager network-manager-applet

# start
sudo systemctl enable NetworkManager

Fonts

Fira Code Nerd font

yay -S otf-nerd-fonts-fira-code

For Powerline

yay -S ttf-dejavu-sans-mono-powerline-git

For Chinese

sudo pacman -S noto-fonts-cjk adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts

For Polybar

yay -S siji-git

Input Methods

Fcitx

# install
sudo pacman -S fcitx-im fcitx-configtool fcitx-googlepinyin

# config
# sudo vim ~/.xprofile # 如果使用 bash 作为默认 shell
sudo vim ~/.zprofile # 如果使用 zsh 作为默认 shell

# 添加以下内容
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
# 关闭并保存文件
:wq!

Virtualbox

sudo pacman -S virtualbox

sudo modprobe vboxdrv vboxnetadp vboxnetflt

Tools

Nitrogen

wallpaper setter

sudo pacman -S nitrogen

Neofetch

sudo pacman -S neofetch

Ranger

command file manager

sudo pacman -S ranger

Ueberzug

preview images

yay -S python-ueberzug

Broswer

Google-Chrome

sudo pacman -S google-chrome

Vim

Install Vim-Plug

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Install plugins

:PlugInstall

ZSH

install zsh

sudo pacman -S zsh

Install Oh-My-Zsh

# curl
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# wget
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

Install plugins

zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

then, add to your ~/.zshrc

plugins=(zsh-autosuggestions)
zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

then, add to your ~/.zshrc

plugins = (zsh-syntax-highlighting)

About

my personal config files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published