Steps to set up new linux machine:
# vim /etc/systemd/networkd/20-wired.network
...
# systemctl enable --now systemd-networkd
# systemctl enable --now systemd-resolved
# pacman -S sudo neovim
# EDITOR=nvim
# visudo
# pacman -S git openssh zsh python
# chsh -l /bin/zsh
# useradd -m -G wheel -s /bin/zsh h
$ ssh-keygen
$ mkdir Git
$ cd Git
$ git clone git@github.com:jakkdl/dotfiles.git
$ cd dotfiles
$ git submodule init
$ python apply_symlinks.py
$ ./fix_links.sh
$ sudo systemctl enable --now suspend_low_bat.timer
~/.local/bin/sway-session snapshots all workspaces (layout, programs, terminal
cwds, nvim sessions, per-terminal history) and restores them on next login. No
setup beyond apply_symlinks.py — it is wired entirely through the sway config:
- saved before every suspend via
swayidle'sbefore-sleep(covers idle, low-battery and manual suspend), and on sway exit via$mod+Ctrl+Shift+q; - restored once per login via
exec sway-session-restorein the sway config; - per-terminal history is captured by a
zshaddhistoryhook in.zshrc.
Snapshots are kept (last 10) under $XDG_STATE_HOME/sway-session/states/.
Manual use: sway-session list, sway-session restore [<timestamp>|N] --force.
Logs in $XDG_STATE_HOME/sway-session/{save,restore}.log.
$ sudo pacman -S sway swaylock swayidle polkit waybar wofi xdg-desktop-portal-wlr python-i3ipc mako swaybg
$ sudo pacman -S python-pipx
$ yay -S python-togglcli
$ sudo pacman -S foot firefox
$ sudo pacman -S starship ttf-firacode-nerd
$ sudo pacman -S sheldon
$ sudo pacman -S moreutils # ts
$ sudo pacman -S swaync # notifications
$ sudo pacman -S pacman-contrib # paccache, pacman hook
$ sudo pacman -S acpi # suspend-low-bat hook
$ sudo pacman -S tree-sitter-cli # neovim plugin dep
$ sudo pacman -S earlyoom systembus-notify
$ sudo systemctl enable --now earlyoom
$ sudo pacman -S iwd
$ sudo systemctl enable --now iwd
$ sudo pacman -s pipewire pipewire-pules wireplumber pipewire-audio pipewire-alsa pipewire-jack
$ cd ~/Git
$ sudo pacman -S --needed base-devel
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si
or
$ cd ~/Git
$ sudo pacman -S --needed base-devel devtools
$ mkdir ~/Chroot
$ mkarchroot ~/Chroot/root base-devel
$ arch-nspawn ~/Chroot/root pacman -Syu
$ makechrootpkg -c -r ~/Chroot
$ pacman -U yay-[version].pkg.tar.zst
...
install wl-clipboard xdg-utils: for content type inference in wl-copy (?)
expect - for unbuffer, for man alias
sudo pacman -S xdg-utils # xdg-open, content type inference in wl-copy
sudo pacman -S brightnessctl
noto-fonts-emoji (emoji picker, etc) ttf-fonts-awesome (waybar)
dark-mode switching sudo pacman -S xdg-desktop-portal-gtk
mkdir ~/Media/pictures/screenshot
systemd-resolved requires symlinking /etc/resolv.conf for applications that have it hard-coded (e.g. go)
sudo ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
sudo pacman -S libnotify jq