Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

139 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAIS — Arch Linux Bootstrap and Configuration Scripts

Warning

MAIS is an actively developed personal project and may contain bugs, incomplete functionality or destructive behavior. It is not intended for production systems or unattended deployments. Review the code, keep backups and use it at your own risk.

Installation

Bootstrap the latest release

From an Arch Linux shell with root privileges, run:

curl -fsSL https://github.com/themamiza/mais/releases/latest/download/mais | bash -s -- install

That's it.

The bootstrap script downloads the latest published release, verifies its checksum and installs it to:

/usr/local/bin/mais

To update an existing installation:

sudo mais install

Install the latest release from a cloned repository

The modular development version can also run the installer:

git clone https://github.com/themamiza/mais.git
cd mais
sudo ./mais install

This uses the cloned repository as a launcher, but the installed executable is still downloaded from the latest published GitHub Release.

Build and install from source

Clone the repository, build the standalone executable and install that exact version:

git clone https://github.com/themamiza/mais.git
cd mais
./tools/build.sh
sudo install -Dm755 release/mais /usr/local/bin/mais

This method installs the code from the latest commit instead of downloading the latest published release.

What is MAIS?

MAIS is a collection of Bash scripts used to install and configure Arch Linux systems.

It can bootstrap a fresh Arch installation, install selected groups of programs, configure the system, install dotfiles, create backups and perform other repetitive setup tasks.

MAIS is primarily designed for my own machines and preferences, but the program list, dotfiles repository and individual commands can be changed or used independently.

Run the following to see the available commands:

mais help

Arch installation

Before running the installer, partition and format the target disk manually.

Mount the root filesystem at /mnt and mount any additional filesystems below it. On UEFI systems, mount the EFI system partition at /mnt/efi.

sudo mais arch-install

Values can be provided before installation to avoid some interactive prompts:

sudo mais arch-install \
    -u username -h hostname -t Region/City

Caution

Do not run arch-install on an existing installation.

Installing programs

MAIS installs programs from data/programs.csv.

Install every listed program:

mais install-programs

Install only a selected tag:

mais install-programs hyprland

The currently supported tags are:

 x11   wayland        |-dev-|-----|-----|-----|    extra
  |       |           |     |     |     |     |
 dwm   hyprland    python clang  lua   bash  js    virt

Programs without a tag are installed with every selection.

The programs.csv file

The programs file has four fields separated by |:

installation method | tag | package name | description

For example:

AUR      | extra    | some-package-git | "Description of the package"
Suckless | dwm      | username/dwm     | "A dynamic window manager"
         | hyprland | hyprland         | "A Wayland compositor"

The installation method can be:

  • Blank or Pacman for an official repository package.
  • AUR for an AUR package.
  • Suckless for a supported source repository.
  • DoomEmacs for the Doom Emacs installation method.

Lines beginning with # are comments and whitespace around fields is ignored.

Programs are processed from the top of the file to the bottom, so packages may be ordered when one depends on another.

Dotfiles

By default, MAIS installs my dotfiles:

mais install-dotfiles

A different repository can be supplied:

mais install-dotfiles https://github.com/username/dotfiles

When ~/rp/dotfiles already exists, MAIS uses that local repository instead of cloning the default or supplied repository.

Other commands

Install an AUR helper:

mais install-aurhelper yay
mais install-aurhelper paru

Configure GRUB, Pacman, Makepkg and supported optional programs:

sudo mais configure

Update the Arch mirror list:

sudo mais update-mirrors

Create a backup using the predefined backup rules:

mais backup

Give the backup a custom name:

mais backup backup-name

Use --verbose or -v to display command output:

mais configure --verbose

Use --quiet or -q to suppress normal MAIS output:

mais configure --quiet

Experimental commands are intentionally not documented here. Review their implementation before using them.

The script itself

The development version of MAIS is split into modules for readability, testing and easier maintenance.

The main entry point is mais, while the implementation is divided between:

lib/cli/        command-line parsing, help and dispatch
lib/commands/   user commands
lib/core/       shared helpers and configuration
lib/distro/     distribution-specific operations

Clone the repository and run the modular version with:

git clone https://github.com/themamiza/mais.git
cd mais
./mais help

The modular mais file depends on the accompanying lib/ directory and should not be downloaded by itself. Use the published standalone release for normal installation.

Testing

Install ShellCheck, then run:

./tools/run_tests.sh

To build and test the standalone release:

./tools/run_tests.sh --release

The checks include Bash syntax validation, focused smoke tests, ShellCheck, standalone build validation and checks for unsafe shell-string execution.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages