linux-init

This is a shell script that automates my Linux setups after an installation.

The script has saved me a lot of time through multiple Linux installs, but I’m not sure how useful it would be for anyone else. Years of customization are included in this, and you’d really only want to use it to end up with my exact OS setup. I don’t expect there are many people using anything remotely near my setup, although I guess someone out there may want to try it out. Surely the combination of just dwm and Colemak-DH puts me in an extreme minority.

However, you could start with my script as a base and edit it to create your own Linux setup script. The overall design of the script would make a good starting point for any Linux user.

The workflow is: install Fedora from the netinstall ISO with ‘Basic Desktop’ and nothing else selected, clone this repo into the new home directory, drop .fonts/ there alongside the script, and .ssh and .gnupg into secrets/, then run it and answer the prompts. That’s the whole thing. I can go from a bare install to a fully configured machine without touching anything else.

Here’s an overview of what it does:

  1. Copies SSH and GPG keys in from secrets/
  2. Creates my standard home directory structure
  3. Updates the system with dnf
  4. Installs and configures LightDM, and puts a custom background on the LUKS unlock screen at boot
  5. Installs the development packages I want and removes the ones I don’t
  6. Clones and builds my own versions of dwm, st, and dmenu, and sets up an xinitrc for the dwm session
  7. Stows my dotfiles with GNU Stow
  8. Sets zsh as the default shell
  9. Sets up my KMonad configuration
  10. Clones whatever other repos I’ve listed into their target locations

Every step except the package update asks for confirmation first, so you can pick what you actually want at runtime rather than editing the script beforehand.

The KMonad piece is probably where this gets least portable. On top of Colemak-DH, it puts modifiers on the bottom row as hold-keys: in qwerty terms, hold z for ctrl, x for alt, c for super, v for a numpad under the right hand, with the mirror image on /, ., ,, and m; hold space for vim-style direction keys; caps lock is backspace. Mod + grave switches layout, but colemak_dh_ortho is my default and dwm is configured around it. Which is roughly the point at which I realized how few people are going to want to run this unmodified. I’ll make a separate blog post about my keyboard setup.

The script is here on GitHub.

← Back to Projects