timedatectl set-ntp true
# legacy using dos, modern using gpt
fdisk /dev/sdX
mkfs.ext4 /dev/sdX2
mkfs.vfat -F32 /dev/sdX1
mount /dev/sdX2 /mnt
mkdir /mnt/boot
mount /dev/sdX1 /mnt/boot
pacstrap /mnt base
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
pacman -S vim
# uncomment needed locales
vim /etc/locale.gen
locale-gen
vim /etc/locale.conf
LANG=en_US.UTF-8
vim /etc/hostname
myhost
passwd
# legacy
grub-install --target=i386-pc /dev/sdX
vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet transparent_hugepage=madvise"
grub-mkconfig -o /boot/grub/grub.cfg
# efi
bootctl install
vim /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=7f653dca-fcb8-49d3-b703-8f6dc033fd03 rw video=DP-4:1920x1080@60 transparent_hugepage=madvise
vim /boot/loader/loader.conf
timeout 4
default arch
useradd -m amos
passwd amos
pacman -S sudo
vim /etc/sudoers/amos
amos ALL=(ALL) NOPASSWD: ALL
pacman -S base-devel expac yajl git
git clone https://aur.archlinux.org/trizen-git.git
cd trizen-git
makepkg -si
trizen -S xkeysnail blueman flameshot libinput-gestures autokey discord transgui-gtk transmission-cli ttf-symbola-free ttf-nerd-fonts-symbols ipv6calc rclone zeal sqlite-pcre-git zsh libqalculate ntfs-3g meson redshift netctl pass libjpeg6 shfmt acpi alsa-lib alsa-utils android-sdk arandr arc-gtk-theme arc-icon-theme arc-kde aspell-en autopep8 bear capitaine-cursors ccache clang cmake compton conky-lua cups direnv dnsmasq dnsutils docker dstat dunst earlyoom exfat-utils expect fcitx5-im fcitx-configtool fcitx5-rime rime-double-pinyin fcitx-dbus-commit-string gconf getmail giflib gnome-themes-standard gnutls go gobject-introspection gpick gpm grc gst-libav gst-plugins-good gst-plugins-ugly gtk-doc gtk3 gtk3 hicolor-icon-theme hplip inotify-tools intltool ipset jansson jdk8-openjdk jq libevent libfdk-aac libmagick6 libotf librsvg libxpm linux-headers llvm lsof lxappearance lxrandr-gtk3 m17n-lib maim mbedtls moreutils mpv mtr ncdu ncurses net-tools ninja nmap npm ntp openbsd-netcat openconnect openssh p7zip pandoc-bin paps parallel pavucontrol pdfjs pinta pkg-config pkgfile poppler-data prettier pulseaudio pulseaudio-alsa pulseaudio-ctl python-attrs python-black python-language-server python-mccabe python-pycodestyle python-pydocstyle python-pyflakes python-pylint python-pypeg2 python-pyqt5 python-pyqtwebengine python-rope python-sphinx python-virtualenv python-yaml qt5-script qt5-svg qt5-tools qt5-x11extras readline refind-efi rofi rofi-dmenu rofi-calc rsync ruby samba sdcv sddm simple-obfs slock socat stalonetray strace sxhkd sysdig sysstat tcl tcpdump tesseract tesseract-data-chi_sim tesseract-data-eng tesseract-data-jpn texlive-bin texlive-lang texlive-most texlive-slashbox thinkfan tidy time ttf-dejavu ttf-freefont ttf-inconsolata ttf-ms-fonts ttf-roboto ttf-roboto-slab ttf-ubuntu-font-family ttf-wps-fonts unclutter-xfixes-git unixodbc vala vim vnstat weechat wget wordnet-cli wps-office wqy-microhei-kr-patched xclip xdo xdotool xininfo-git xorg-fonts xorg-fonts-misc xorg-twm xorg-xbacklight xorg-xclock xorg-xdpyinfo xorg-xev xorg-xinput xorg-xlsfonts xorg-xprop xorg-xrdb xorg-xset xorg-xsetroot xorg-xwininfo xsensors xterm yapf zbar zenity zerotier-one zip --noconfirm --needed
trizen -S mimi-git
sudo vim /etc/polkit-1/rules.d/49-nopasswd_global.rules
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
sudo usermod -aG wheel amos
sudo usermod -aG sys amos
sudo usermod -aG docker amos
sudo usermod -aG input amos
sudo usermod -aG disk amos
cd ~/git
git clone https://github.com/amosbird/serverconfig
cd serverconfig
git remote set-url origin [email protected]:amosbird/serverconfig
sh restore.sh
trizen -S vte3-git librime-git
trizen -S librime-git rofi-emoji bspwm-git copyq-git feh-git freerdp-git llpp-git netevent-git obs-studio-git vte3-git termite-git xcape-git caps-indicator --noconfirm --needed
# switch to git insteadOf workflow
# cd ~/git/serverconfig/aurs
# find -name PKGBUILD | sort -r | xargs -I '{}' bash -c 'cd $(dirname "{}"); makepkg -si --noconfirm'
cd ~/git
git clone [email protected]:amosbird/qutebrowser
cd ~/git
git clone [email protected]:amosbird/cc-snippets cc-playground
git clone https://github.com/hlissner/doom-emacs -b develop ~/.emacs.d
doom install
~/gentoo ~/.terminfo ~/.gnupg ~/.ssh ~/.getmail ~/.msmtprc ~/.stardict
~/.local/share/fonts ~/.local/share/qutebrowser /etc/ld.so.conf.d/99-user-local.conf /etc/sddm.conf /etc/hosts /etc/netns/zt/resolv.conf /etc/samba/smb.conf /etc/cups /etc/sysctl.d /etc/default/earlyoom /etc/ipset.conf /etc/iptables/iptables.rules /etc/iproute2/rt_tables /etc/X11/xorg.conf.d /etc/polkit-1/rules.d /etc/netctl /etc/udev/hwdb.d /etc/udev/rules.d /etc/sysconfig/libvirt-guests /etc/systemd/system/thinkfan.service.d /etc/systemd/system/transmission.service.d /etc/systemd/system/zerotier-one.service.d /etc/systemd/system/[email protected] /usr/local/bin/getcursorpos /usr/local/bin/gnirehtet /usr/local/bin/netns-exec /usr/local/bin/netns-exec-dbus /etc/thinkfan.conf /etc/modprobe.d /etc/modules-load.d /etc/pulse/default.pa
cd sudo cp -r .terminfo /root
mkdir -p Downloads Mail Desktop Pictures/Paste Pictures/Screenshots Videos/Screencasts Music Books org/todos Documents/pdfs Documents/ppts Documents/docs
systemctl enable sddm systemctl enable org.cups.cupsd.service systemctl enable dnsmasq systemctl enable earlyoom systemctl enable ipset systemctl enable iptables systemctl enable sshd systemctl enable thinkfan systemctl enable zerotier-one systemctl enable docker
ccache -M 50G sudo pkgfile –update updateroutes updatednsmasq
https://gist.github.com/Informatic/49bd034d43e054bd1d8d4fec38c305ec
rm -R etc/pacman.d/gnupg rm -R root.gnupg/ rm -R var/cache/pacman/pkg gpg –refresh-keys pacman-key –init pacman-key –populate archlinux pacman-key –refresh-keys pacman -Syyu
/etc/lightdm/lightdm.conf
[Seat:*] autologin-user=username autologin-session=session