System install guide
Install guide with DIY spirit, key is to reproduce my system setup while making sure understanding is there and all.
- Commands are written for user
kkunless stated otherwise.
0. Current TODOs
System / mounts
- Add server SSH keys and PC SSH keys
- Mount the mobile phone
- Make sure nobody else can log in when I connect to random Wi-Fi.
- Mount
/protonon startup - Mount
/lenovo-laptop - Mount server at
/server-vps
Desktop / UX
- Hibernate if not using the PC for 10 minutes
- Start Sway in a tmux session for debugging
- Kakoune setup
- Firefox bookmarks
- Ideas for Chinese learning integration
Launcher / search
- Combine apps, scripts, bookmarks, and files
- Use
.desktopfile name instead of theNameparameter
- Use
- Everything relevant in
wmenubrowserplocate + wmenu > xdg-open- Applications +
binfolder - Bookmarks
Ideas looking for problems
- tmux automation
1. Bootstrap sudo and git
su root
export PATH="$PATH:/usr/sbin"
apt install sudo git
usermod -aG sudo kk
Then exit both root and the user session, and log in again so the sudo group change applies.
Verify:
groups # should see "sudo"
sudo whoami # you should see "root"
Expected output from sudo whoami:
root
2. Install basic utilities
Automate later.
sudo apt update
sudo apt install -y \
clang \
cmake \
build-essential \
make \
tcc \
vim \
ripgrep \
curl \
git \
man-db \
plocate \
tmux \
fzf \
dtrx \
gdb
sudo updatedb # plocate update the database so you can query files on PC nicely
- fzf - fuzzy search on command line, good for making command line tools
- ripgrep - better grep, nicer syntax and faster: rg "query"
- dtrx - nice archive unpacking wrapper that makes it less confusing, just dtrx thing.zip or whatever other tar and it should work nicely
Mostly development tools are downloaded here, stuff like tmux, vim and the compiler toolchain needed for development, compiling etc.
3. Speed up GRUB boot
Automate later. Edit /etc/default/grub:
sudo vi /etc/default/grub
Set:
GRUB_TIMEOUT=0
GRUB_TIMEOUT_STYLE=hidden
Apply changes:
sudo update-grub
4. Enable Debian non-free repositories
Automate later. Needed for NVIDIA and firmware packages.
Edit /etc/apt/sources.list and add:
contrib non-free non-free-firmware
Then update apt:
sudo apt update
5. Install drivers and firmware
Machine-specific / automate carefully.
sudo apt install -y \
nvidia-driver \
firmware-misc-nonfree \
linux-headers-amd64
TODO:
- Set NVIDIA modeset to
1. - Update initramfs.
- Reboot.
7. Desktop environment: Sway
Automate later.
sudo apt install -y \
sway \
swayidle \
swaybg \
swaylock \
foot \
wmenu \
brightnessctl \
xwayland \
wl-clipboard \
xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk \
xdg-user-dirs \
fonts-jetbrains-mono \
fonts-noto-cjk \
fonts-noto-cjk-extra \
pipewire \
pipewire-pulse \
pipewire-alsa \
wireplumber \
pavucontrol \
grim \
ffmpeg libavcodec-extra
Package notes:
- sway, terminal, menu, addons:
sway- the Wayland window manager / desktop environment of choice. This is the main thing that replaces a traditional desktop like GNOME or KDE.swayidle- idle manager for Sway. Used for things like locking the screen, turning off the display, suspending, or hibernating after a timeout.swaybg- simple wallpaper/background setter for Sway.swaylock- screen locker for Sway/Wayland. Used when locking the session manually or fromswayidle.foot- terminal emulator for Wayland. This is the main terminal.wmenu- small menu/launcher for Wayland. Useful for app launching and custom scripts like bookmarks/search/file opening.grim- screenshot tool for Wayland. Usually used together with selection/clipboard scripts later.brightnessctl- command line tool for changing screen brightness, usually bound to laptop brightness keys.xwayland- compatibility layer that allows older X11 applications to run inside the Wayland/Sway session.wl-clipboard- Wayland clipboard tools, mainlywl-copyandwl-paste. Needed by scripts and editor integrations.fonts-jetbrains-mono- nice monospace font for terminal/editor use.
- xdg, a standard required by some apps (shared enviroment variables and such):
xdg-desktop-portal-wlr- desktop portal backend for wlroots compositors like Sway. Needed for screen sharing, screenshots, file pickers, and other app integrations.xdg-desktop-portal-gtk- GTK portal backend/fallback. Helps with file picker dialogs and desktop integration for some applications.xdg-user-dirs- creates standard user folders like~/Downloads,~/Documents,~/Pictures, etc.
- fix unicode characters (like Chinese) not showing up properly in firefox:
fonts-noto-cjk- fonts needed for displaying Chinese, Japanese, Korean, etc. characters in Firefox, Chromium, terminal apps, and other programs.fonts-noto-cjk-extra- additional CJK font coverage/styles.
- audio:
pipewire- the main modern Linux audio/media server. Handles audio routing and is also useful for screen sharing/media integration on Wayland.pipewire-pulse- PulseAudio compatibility layer for PipeWire. Makes applications that expect PulseAudio work through PipeWire instead.pipewire-alsa- ALSA compatibility layer for PipeWire. Helps applications that use ALSA directly play/record audio through PipeWire.wireplumber- PipeWire session/policy manager. It decides how audio devices and streams should be connected automatically.pavucontrol- graphical volume mixer. Useful for choosing input/output devices, changing app volumes, and debugging audio problems.
- codecs (to fix videos not playing in browser):
- ffmpeg libavcodec-extra
Fix Sway permission issues
If Sway reports render/video permission errors, add the user to the relevant groups:
sudo usermod -aG video,render kk
Log out and back in afterwards.
9. SSH keys
Manual. Generate a key if the machine does not already have one:
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ""
Now exchange the keys with relevant machines so as to make communication easier. This prepares the ground for mounting these machines as easy to access drives.
10. SSHFS drives
Partly manual. Install SSHFS:
sudo apt install -y sshfs
Create mount points as needed:
sudo mkdir -p /server-vps /lenovo-laptop /proton
Example /etc/fstab entry for the VPS:
root@157.90.144.237:/ /server-vps fuse.sshfs noauto,x-systemd.automount,_netdev,x-systemd.idle-timeout=2min,x-systemd.mount-timeout=10s,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,IdentityFile=/home/kk/.ssh/id_ed25519,UserKnownHostsFile=/home/kk/.ssh/known_hosts,StrictHostKeyChecking=accept-new,allow_other,default_permissions 0 0
Test after editing /etc/fstab:
sudo systemctl daemon-reload
ls /server-vps
11. Browser / internet tools
Automate later.
sudo apt install -y chromium
Optional text/web search tools:
sudo apt install -y w3m surfraw
12. Extras
Clipboard history
sudo apt install -y cliphist
13. Voice typing: Voxtype
Manual / automate carefully.
Install Voxtype:
curl -LO https://github.com/peteonrails/voxtype/releases/download/v0.6.0/voxtype_0.6.0-1_amd64.deb
sudo dpkg -i voxtype_0.6.0-1_amd64.deb
rm voxtype_0.6.0-1_amd64.deb
Install runtime dependencies:
sudo apt install -y \
wtype \
wl-clipboard \
libnotify-bin \
playerctl
Allow input access:
sudo usermod -aG input "$USER"
Log out and back in afterwards.
Optional GPU support
read -r -p "Enable GPU support? [y/N] " answer
case "$answer" in
[yY]|[yY][eE][sS])
sudo voxtype setup gpu --enable
;;
esac
Voxtype setup
voxtype setup
voxtype setup systemd
voxtype setup model