Dernière activité 1771764666

Révision bf56ab65b71b64c4fa8053558a41bc55be82d67b

after-reboot.sh Brut
1systemctl enable NetworkManager
2echo "export EDITOR=nvim" >> ~/.bash_profile
3source ~/.bash_profile
4useradd -m -G wheel -s /bin/bash frain
5passwd frain
6visudo
7pacman -S plasma-meta konsole dolphin
8systemctl enable sddm
9systemctl start sddm
10
11# Chinese Input Method
12sudo pacman -S fcitx5-im
13sudo pacman -S fcitx5-chinese-addons
14cat << EOF >> /etc/environment
15GTK_IM_MODULE=fcitx
16QT_IM_MODULE=fcitx
17XMODIFIERS=@im=fcitx
18SDL_IM_MODULE=fcitx
19GLFW_IM_MODULE=ibus
20EOF
21
22cat << EOF >> /etc/pacman.conf
23[archlinuxcn]
24Server = http://mirrors.gdut.edu.cn/archlinuxcn/$arch
25EOF
26sudo pacman-key --lsign-key "[email protected]"
27sudo pacman -Sy archlinuxcn-keyring
28
29su frain
30sudo pacman -S chezmoi
31chezmoi init https://github.com/Richard-Zheng/dotfiles.git
32
arch-install-btrfs.sh Brut
1ESP=/dev/nvme0n1p1
2ROOT=/dev/nvme0n1p2
3SWAPFILESIZE=2G
4
5mkfs.btrfs -L ROOT $ROOT
6
7mount $ROOT /mnt
8btrfs sub create /mnt/@
9btrfs sub create /mnt/@swap
10btrfs sub create /mnt/@home
11btrfs sub create /mnt/@pkg
12btrfs sub create /mnt/@snapshots
13btrfs sub create /mnt/@vm
14umount /mnt
15
16# For configure mount options, see https://btrfs.wiki.kernel.org/index.php/FAQ#Can_I_mount_subvolumes_with_different_mount_options.3F
17mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@ $ROOT /mnt
18mkdir -p /mnt/{boot,home,var/cache/pacman/pkg,.snapshots,btrfs,/var/lib/libvirt}
19mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@home $ROOT /mnt/home
20mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@pkg $ROOT /mnt/var/cache/pacman/pkg
21mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@snapshots $ROOT /mnt/.snapshots
22mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@vm $ROOT /mnt/var/lib/libvirt
23mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvolid=5 $ROOT /mnt/btrfs
24mount $ESP /mnt/boot
25
26# Create swapfile
27btrfs filesystem mkswapfile --size $SWAPFILESIZE --uuid clear /mnt/btrfs/@swap/swapfile
28swapon /mnt/btrfs/@swap/swapfile
29
30pacstrap -K /mnt base linux linux-firmware intel-ucode sof-firmware networkmanager man-db man-pages neovim grub efibootmgr zsh
arch-install-chroot.sh Brut
1# Replace hostname with the name for your host
2export HOST=hostname
3# Replace Europe/London with your Region/City
4export TZ="Europe/London"
5
6echo $HOST > /etc/hostname
7cat << EOF >> /etc/hosts
8127.0.0.1 localhost
9::1 localhost
10127.0.1.1 $HOST.localdomain $HOST
11EOF
12
13ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
14# Sync system time to hardware clock
15hwclock --systohc
16
17# - set locale
18echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
19#echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen
20locale-gen
21echo 'LANG=en_US.UTF-8' > /etc/locale.conf
22
23grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
24grub-mkconfig -o /boot/grub/grub.cfg
25
26passwd root
27