The goal of this automation is to install Void Linux on a laptop. This setup is using a very minimal and secure install with the following goals:
- UEFI system with Secure Boot.
- Full disk encryption with LUKS2.
- Partitioned as below:
- 1024MiB /efi efi partition.
- Rest / root parition.
- No swap (not required for sleep).
- Void Linux x86 minimal install.
- Swayfx windows manager.
Tip
If you want to mount an NFS share to grab any other files you may want to include in your install: sudo mount -t nfs -o vers=4 <ip>:/path /mount/path
- Ensure the USB is not mounted with
sudo umount /dev/sdX. - Write the void image to the USB with
sudo dd bs=4M if=/path/to/void.iso of=/dev/sdX
Before running the install-void.sh script, there are a few thing that need to be setup first.
- Enable TPM.
- Set BIOS password.
- Boot into BIOS and set secureboot into setup mode.
- DELETE all keys
- ALLOW microsoft keys (optional)
- RESET to setup mode
- TURN OFF secureboot (will enable post install)
- Set a BIOS password (require for both entering bios and boot menu).
- Set boot order to DISK,USB. Remove all other options.
- Save and reboot into live install.
Warning
Don't forget to save all passwords to your password manager!
- Boot into live install.
- Login with
rootpasswordvoidlinux. - Clone this repo.
- Install git
xbps-install git. - If you are getting a trans error, run
xbps-install -Sthen try again. - Clone repo
git clone https://github.com/dylanbegin/void-install.git. - Adujst any variables in the script
install-void.shyou need. - Set the script as executable with
chmod +x install-void.sh - Run the script with
./install-void.sh - Follow all propmts and reboot when it's done.
Once the install is completed remove the USB and reboot back into BIOS.
- Enable secureboot.
- Remove USB option from boot menu.
- Save and reboot. Then login to Void.
Install the main repo.
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepoThen install any needed apps. For example, I use:
flatpak install flathub com.github.tchx84.Flatseal
flatpak install flathub com.brave.Browser
flatpak install flathub com.bitwarden.desktop
flatpak install flathub dev.vencord.Vesktop
flatpak install flathub com.jgraph.drawio.desktop
flatpak install flathub com.moonlight_stream.Moonlight
flatpak install flathub com.slack.Slack[!NOTE]
At this point you are pretty much done with the install. Anything below is my own customizations and dot files, but I'm sharing them here too! Feel free to use whatever you want!
- Start with cloning my dotfiles repo:
- Clone the repo
git clone https://github.com/dylanbegin/dotfiles - Copy repo into home directory
cp -r dotfiles/* ${HOME}/ && cp -r dotfiles/.* ${HOME}/ - Set the install scripts to executible
chmod +x install-* - Run the install scripts
./install-<name>.sh1. The icon and theme scripts are still very much in development. Do not use these right now.
Theming in Linux sucks... a lot. And it sucks even more whithout a DE. The ~/.local/share/ folder already comes with several, fonts, icons/cursors, and themes installed from the steps above. Below is a general guide on how to unify our theme. Also check out the theming section on the Arch wiki for more information .
- Setup GTk3, icon, and font with
nwg-look. - Copy
gtk-4.0folder from~/.local/share/themes/<theme>/into~/.config/. - QT...fuck this shit. (TBD)
- Sync flatpak theming by adding the following lines into the
Other Filesglobally:
~/.themes:ro
~/.config/gtk-3.0:ro
~/.config/gtk-4.0:ro
~/.config/xsettingsd:ro
~/.local/share/themes:ro
~/.local/share/icons:ro- Link flatpak environment variables globally:
GTK_THEME=<theme-name>
ICON_THEME=<icon-name>| Name | Type |
|---|---|
| Cursors | |
| Cursors | |
| Cursors | |
| Cursors | |
| Cursors | |
| Cursors | |
| Cursors | |
| Fonts | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons | |
| Icons |
Below is some early testing stuff I've been messing around with using DWL. This doesn't really work but might help some others using DWL??
- In order to build from source you will need to install the following packages:
doas xbps-install base-devel cairo-devel clang fcft-devel gtk+-devel gtk+3-devel gtk4-devel gtk-layer-shell-devel meson ninja pango-devel wayland-scanner++ wlroots-devel
- Additionaly, if you need rust, you will want to install the nightly toolchain of rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Customize the install by selecting
2and on the toolchain method enternightly. - To uninstall use:
rustup self uninstall< These packages can be removed once all builds are complete. {is.info}
- Customize the install by selecting
- Install dependancy packages:
doas xbps-install cairo pango wayland wayland-protocols wlroots xorg-server-xwayland - Make sure the following repo's are in the
~/buildfolder:- dwl:
https://github.com/djpohly/dwl.git - dwlb:
https://github.com/kolunmi/dwlb.git - someblock:
https://git.sr.ht/~raphi/someblocks - afetch:
https://github.com/13-CF/afetch.git - nnn:
https://github.com/jarun/nnn.git
- dwl:
- Build apps:
makethenmake clean installin each directory (dwl,dwlb, andsomebarwill requiredoas).- Build
nnnwithmake O_NERD=1
- Build
- All patches should already be applied, but if you added more in the furture, below is a general guide:
- Remove
config.h:rm -f config.h - Apply patch with git:
git apply -3 patches/{patch-name}.diff- Or apply patch with
patch:patch -p1 < patches/{patch-name}.diff - Debug with:
vi -p {file.rej} {file.c} - Now check the config files:
vi -d config.def.h config.h
- Or apply patch with
- Remove debug file and make:
rm -f *.orig *.rejthenmake - Recompile app:
doas make clean install
- Remove
- You can unpatch with:
git apply -R patches/{patch-name}.diff
If you are using eww here are some tips:
- Clone eww in
~/buildfolder:git clone https://github.com/elkowar/eww - Build eww:
cargo build --release --no-default-features --features=wayland - Run eww:
cd target/releasethenchmod +x ./eww - Link to bin:
doas ln -s ~/build/eww/target/release/eww /usr/local/bin/ - Test eww with:
eww daemontheneww -c ~/.config/eww/bar/ open bar - Show logs:
eww -c ~/.config/eww/bar logs
https://wiki.archlinux.org/title/Dracut https://wiki.archlinux.org/title/Dm-crypt/System_configuration https://wiki.archlinux.org/title/EFISTUB https://wiki.archlinux.org/title/Trusted_Platform_Module https://wiki.gentoo.org/wiki/EFI_stub https://github.com/olivier-mauras/void-luks-lvm-installer https://github.com/NetBeholder/VoidLinux-installation-guide https://github.com/MeganerdNL/uki-automation-dracut https://gist.github.com/dko1905/7c9ce651418e01f7838329dd402e5529 https://gist.github.com/Dko1905/dbb88d092aa973a8ba244eb42c5dd6a6 https://practicalparanoid.com/linux/encrypted-void-linux-musl-install-via-cli/ https://mth.st/blog/void-efistub/ https://www.redhat.com/sysadmin/disk-encryption-luks
And some additional reading material around TPM/SB security challenges. https://en.wikipedia.org/wiki/Cold_boot_attack https://pulsesecurity.co.nz/articles/TPM-sniffing https://pulsesecurity.co.nz/advisories/tpm-luks-bypass https://security.stackexchange.com/questions/252391/understanding-tpm-pcrs-pcr-banks-indexes-and-their-relations https://pawitp.medium.com/the-correct-way-to-use-secure-boot-with-linux-a0421796eade https://techjungle.gitlab.io/post/binding_luks_with_tpm/ https://www.tevora.com/threat-blog/configuring-secure-boot-tpm-2/