Blog

arch linux を入れる 2022年版

久々に arch linux を使おうかな、と思いまして。なんかもうプライベートで使うマシン、mac じゃなくていいなーって気分が高まりすぎてる。 archlinux の利点は、pacman で管理できて、だいたいのものが AUR 経由でインストールできるので便利という感じなのと、ubuntu と違って、必要なものしか入らない感じにできるってことかな。 (その結果として、必要なものが入ってなくて変な状況になることもあるけど)

昔は頑張って windows のディスクをパーティションきって設定したりしてたけど、めんどくさいので SSD を USB で増設してやる。最近は USB 接続でも十分な速度が出るので良い時代だ。

https://wiki.archlinux.jp/index.php/USB_%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%83%A1%E3%83%87%E3%82%A3%E3%82%A2 rufus で usb memory に書いた。

あとは、公式のガイド通りに設定していけばいい。fdisk はちょっとだるいので、TUI でできる cfdisk でやった。 https://wiki.archlinux.org/title/installation_guide

細かいところでよくわかんなかったところは https://zenn.dev/ytjvdcm/articles/0efb9112468de3 を参考にしたのだが、何を参考にしたのか忘れた。たぶん EFI 周り。

そして、i3wm を startx するような構成にした。 具体的に、入れてるのは以下のようなものです。

#!/bin/bash

set -ex

# install: pacman -S pkgname
# search:  pacman -Ss keyword

# update list
sudo pacman -Syu

# core
sudo pacman -S --needed --noconfirm openssh vim git tmux sudo git-lfs gcc base-devel go the_silver_searcher zsh w3m curl

# nvidia driver(if needed)
sudo pacman -S --needed --noconfirm nvidia

# manage mirror site
sudo pacman -S reflector
sudo reflector --country 'Japan' --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist

# network
# network-manager-applet=nm-applet
sudo pacman -S --needed --noconfirm networkmanager network-manager-applet
sudo systemctl enable NetworkManager

# yay
# yay is the wrapper for AUR and pacman.
if [[ -e /usr/bin/yay ]]; then
    echo "yay exists"
else
    git clone https://aur.archlinux.org/yay.git /tmp/yay && cd /tmp/yay && makepkg -si
fi


# X
sudo pacman -S --needed --noconfirm wezterm firefox i3lock xdg-utils
yay -S --needed --noconfirm google-chrome
yay -S --needed --noconfirm obsidian
# startx
yay -S --needed --noconfirm xorg-xinit

# i3
sudo pacman -S --needed --noconfirm rofi i3-wm polybar xss-lock dunst

# Japanese
sudo pacman -S --needed --noconfirm adobe-source-han-sans-jp-fonts adobe-source-han-serif-jp-fonts otf-ipafont noto-fonts noto-fonts-cjk noto-fonts-emoji
yay -S --needed --noconfirm ttf-mona ttf-monapo ttf-ipa-mona ttf-vlgothic ttf-mplus ttf-koruri ttf-mplus ttf-sazanami ttf-hanazono
sudo pacman -S --needed --noconfirm fcitx5-mozc fcitx5-configtool fitx5-gtk fcitx5-qt fcitx5-im

# JetBrains
yay -S --noconfirm intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre
yay -S --noconfirm jetbrains-fleet

# Ultimate hacking keyboard
yay -S --noconfirm uhk-agent-appimage

./setup-vimplug.sh

# I need to enable multilib for installing steam app
yay -S --noconfirm steam

# Chatting
yay -S --noconfirm slack-electron