This repository contains my files and scripts for installing Arch Linux and configuring various software tools. You are free to copy code, ideas, and structure from the configuration and modify them to your needs. My configuration is a constant work-in-progress, so expect lots of changes over time! I will also list books, code, and other material that has influenced this configuration or improved my Linux skills.
I began the journey to build a custom configuration by reading the book Building your Mouseless Development Environment by Matthieu Cneude. So if you are interested in building your configuration, I recommend reading his book first! The contents of this repository will make much more sense afterward.
Furthermore, I recommend reading first the Linux Pocket Guide and then Efficient Linux at the Command Line by Daniel J. Barret. His books give a concise guide to the essential Linux commands and how to use the command line effectively. Knowing these Linux commands and how to use the command line is fundamental for the configuration presented in this repository.
For a deeper dive into understanding Linux and the Linux kernel, I recommend The Linux Programming Interface by Michael Kerrisk.
My configuration philosophy is to strive for a minimal, ergonomic, and composable configuration by avoiding skeuomorphic design and accepting that such configuration requires effort to learn. It builds upon the Unix Philosophy. Here are the main principles:
Keyboard Driven: We should be able to use our configuration effectively without leaving the keyboard and use the mouse only for graphical tasks.
Command-line Driven: We should primarily use programs via Command-Line Interfaces on a command-line shell. Command-Line Clients (CLIs) are a simple, effective, and composable way to interact with programs compared to Graphical User Interfaces (GUIs).
Prefer Built-in Software Tools, Avoid Unnecessary Dependencies: We should aim to use the built-in software tools and operating system features and install additional software only if necessary.
Shell Scripting: We should create shell scripts for repetitive or complex tasks. We should link the scripts to a single location and make them available throughout the system, similar to built-in commands.
Search over Navigation: We should use search whenever possible instead of navigating through menus.
Text over Binary: We should use text files over binary. Text files are simple, universal, and searchable, and we can track changes to text files using version control.
Modular Configuration: Modularity makes it easier to change components and reason about dependencies.
Information Security is Essential: Your data could get lost, be stolen, or hacked unless you protect it with encryption and backups.
Here is an overview of the setup and configurations.
System:
- UEFI boot
- GRUB bootloader
- LUKS 1 encrypted root, swap and boot
- Ext 4 filesystem
- Terminus-font for the Linux console.
- systemd as the system and service manager.
Shell:
- Key Bindings are similar to VIM.
- Xsh conventions for consistent shell configuration.
- Posix compliant runcoms for common shell configurations.
- Bash for shell scripting.
- Zsh as login and interactive shell.
- XDG specification for defining base and user directories.
- Core Utilities
- LS_COLORS for listing files and directories with colors.
Shell Utilities:
- Git for version control.
- GitHub CLI for hosting Git repositories.
- OpenSSH for SSH connections.
- rsync for file transfer and backups.
- fzf as the fuzzy finder.
- bat for viewing files.
- fd for finding files and directories.
- lsd for listing files and directories.
- ripgrep for searching text from text files.
- ripgrep-all for searching text from multiple files formats.
- tldr for simplified help pages.
- htop for viewing processes interactively.
Editor:
- Neovim as the text editor.
- Vim Plug for managing plugins.
- shellcheck for static analysis for shell scripts.
- yamllint for linting Yaml files.
Window System:
- Inconsolata Nerd Font
- Xorg as the window system.
- i3 as the tiling window manager.
- rxvt-unicode as the terminal emulator.
- resize-font plugin for rxvt
- tmux as the terminal multiplexer.
- Rofi as the application launcher.
- Dunst for notifications.
- maim for taking screenshots.
Other tools:
- Pulse for managing audio.
- brightnessctl for controlling device backlights.
- bluez for bluetooth.
- KeePassXC for managing passwords.
- mupdf for viewing PDF and EPUB documents
- Zathura
- hledger for plain text accounting
- pandoc
List of the hardware I am using with my setup.
- Lenovo Thinkpad T480s laptop
- Kinesis Advantage 2 ergonomic keyboard
- Razer DeathAdder Elite ergonomic mouse
- Kingston DataTraveler USB flash drive
You can read my instructions for creating Archiso and installing Arch Linux.
We can clone the dotfiles repository to the home directory.
git clone [email protected]:jaantollander/dotfiles.git $HOME
Next, let's change working directory to dotfiles.
cd $HOME/dotfiles
Let's install Yay as a helper for installing packages from the Arch User Repository (AUR).
./dot install yay
Next, install packages for the target module.
./dot packages "thinkpad_t480s"
Finally, install configs for the target module.
./dot config "thinkpad_t480s"
The documentation contains a more detailed configuration overview.
Here is a list of some helpful resources for developing dotfiles.
-
ArchWiki is the official resource for everything related to Arch Linux.
-
Matthieu Cneude also has great articles on his website and his dotfiles are also useful.
-
Maxim Baz has useful dotfiles for Arch Linux.
-
An excellent Bash scripting cheatsheet from devhints.
-
The Command Line Interface Guidelines is an excellent resource for writing command-line interfaces.
-
We can use Argbash for adding command-line arguments to Bash scripts.
-
Dylanaraps has written the pure bash bible, pure sh bible, and how to write TUI in Bash which are excellent resources for writing better bash and posix shell scripts. He has also written many other interesting projects using shell scripting such as neofetch, pfetch, fff, pash, torque, and shfm!
-
Specification for Shell and Utilities.