Closed38

arch奮闘記

shuntakashuntaka
wsc list
station wlan0 get-networks
station wlan0 <SSID名>
# passwordを対話型で入力
quit
shuntakashuntaka
mkfs.ext4 /dev/nvme0n1p4
mount /dev/nvme0n1p4 /mnt
shuntakashuntaka
mkdir -p /mnt/boot/EFI
mount /dev/nvme0n1p1 /mnt/boot/EFI
shuntakashuntaka
vim /etc/pacman.d/mirrorlist
/etc/pacman.d/mirrorlistの一番上に追記
Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch
shuntakashuntaka
pacstrap /mnt base base-devel linux linux-firmware grub efibootmgr dosfstools netctl vim iw wpa_supplicant networkmanager dialog
shuntakashuntaka
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash
shuntakashuntaka
vim /etc/locale.gen

以下をアンコメント

  • en_US.UTF-8 UTF-8
  • ja_JP.UTF-8 UTF-8
locale-gen
shuntakashuntaka
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB --boot-directory=/boot/efi/EFI --recheck
grub-mkconfig -o /boot/efi/EFI/grub/grub.cfg
shuntakashuntaka
exit
shutdown -h now

root設定したパスワードでログインする

shuntakashuntaka
systemctl start NetworkManager
systemctl enable NetworkManager
nmcli d wifi list
# 接続可能なwifiを確認
nmcli d wifi connect <SSID> --ask
# 対話型でパスワード入力
# 接続完了

# 接続確認
ping google.com
shuntakashuntaka
useradd -m -g wheel -d /home/shuntaka -s /bin/bash -m shuntaka
passwd username
# 画面の指示に従ってパスワードを設定
pacman -S sudo
EDITOR=vim visudo
# Defaults env_keep += "HOME" の行と %wheel ALL=(ALL) ALL の行のコメントを解除
shuntakashuntaka
sudo pacman -S sway xorg-xwayland qt5-wayland
# 対話型でフォントの選択?で1を選択
shuntakashuntaka
pacman -S lightdm lightdm-webkit2-greeter lightdm-webkit-theme-litarvan
shuntakashuntaka
使いそうだけで使っていなかったやつ

バックグラウンド画像変更

vim /etc/lightdm/lightdm-gtk-greeter.conf 
/etc/lightdm/lightdm-gtk-greeter.conf
[greeter]
background=/usr/share/backgrounds/archlinux/small.png
shuntakashuntaka

その前にgitが必要だった

sudo pacman -S git
git config --global user.name "<your name>"
git config --global user.email "<your email>"
shuntakashuntaka
waybar
sudo pacman -S waybar
# 対話型で1を選択
waybarを使うことにした
waybar
sudo pacman -S i3status
shuntakashuntaka
shuntakashuntaka

yayを使っている記事を見るので入れておく

sudo pacman -S base-devel # <- 前の手順で実行しているのでいらないかも
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
shuntakashuntaka

そもそもターミナル使えないので追加

sudo pacman -S alacritty
shuntakashuntaka

swayで最小限でalacrittyとchromeを使うコンフィグはできた

$(HOME)/.config/sway/config
set $mod Mod4

bar {
    swaybar_command waybar
}

input * {
    xkb_options "ctrl:swapcaps"
}

bindsym $mod+Shift+e exit
bindsym $mod+c exec google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=wayland

set $term alacritty
bindsym $mod+Return exec $term
shuntakashuntaka

Nix

yay -S nix
.bashrc
if [ -e /etc/profile.d/nix.sh ]; then
  . /etc/profile.d/nix.sh
fi
sudo systemctl enable nix-daemon.service
sudo systemctl start nix-daemon.service

設定ファイルを設定

#
# https://nixos.org/manual/nix/stable/#sec-conf-file
#

# Unix group containing the Nix build user accounts
build-users-group = nixbld
#
# Disable sandbox
# sandbox = false

experimental-features = nix-command flakes
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --update
shuntakashuntaka

arch難しいので、一旦manjaro nixやって、ある程度できたらarchに戻るようにしようかな。。

このスクラップは2025/01/02にクローズされました