Pure-dotfiles is dotfile deployment tool, utilizing existing linux tools, bringing them together in one (or more) simple INI files.
Pure-dotfiles takes care of installing dotfiles (using stow), installing the packages associated to your dotfiles (using yay), enables services (using systemctl) and execute bash scripts (using bash). The result is a completely installed system.
The key features of the project include:
- Dotfiles are managed with Gnus
stow - An install file that process script
INIfiles, taking care of:- Installation of
pacmanpackages - Installation of
AURpackages - Enabling and starting of
systemctlservices - Executing of
bashcommands
- Installation of
- A log file is created for each run of the
installscript - Multiple
INIfiles can be provided to the installer.
Note that by maintaining multiple INI files selective or partial installation if larger features, such as desktops, Emacs environment, etc becomes possible.
Installation:
# Install the minimum requirements
pacman -S stow
# Clone your dotfile repository
git clone https://github.com/echjansen/pure-dotfiles ~/dotfiles
# Install packages, services, scripts, etc
python install.py install/core install/emailStow works on the principle that it stows all packages in the parent folder of the dotfile folder.
In case the dotfile folder is located in a sub folder, stow can be informed about the dotfile folder with the -d option.
Use an alias for stow when the dotfile folder is located in a sub directory:
# Allow the repository to be located anywhere
# -vv : verbose with more detail (can also be -vvv)
# -R : revert earlier stows
# -d : full path tho the dotfiles repository
# -t : full path to the target
# --ignore : ignore any file / folder regardless where located
alias stow='stow -vv -R -d ~/Projects/pure-dotfiles/ -t ~/ --ignore=.install.sh'Usage examples:
stow */ # Stow all packages
stow emacs # Stow the emacs configuration (only)
python install.py init-file # Install packages, services and run final commandsThe user configuration files are classical INI files.
- They provide sections identified by
[...]brackets. Each section has a pre-defined behaviour (but could be extended easily):- [pacman] - Installation of packages using the pacman tool (Arch Linux)
- [aur] - Installation of packages using the
yaytool - [service] - Enables and starts
systemctlservices - [script] - Executes
bashcommands lines
An example of a installation INI file:
[pacman]
editor = emacs-wayland
terminal = foot
security = gnupg openssh yubikey-manager
versioning = git gitui
filemanager = ranger
utils = btop htop
# Install package list from aur
[aur]
# Services to be enabled and started
[service]
network = NetworkManager
# Bash commmands to be executed
[script]
# Create mail directory (mbsync)
create maildir user1 = mkdir -p ~/.mail/user1
# Stow packages
Configure all = stow */
Configure bash = stow bash
Configure emacs = stow emacsAn example of the output of running the installation script:
>> [ DONE ] Checking if AUR helper exists.
>> [ DONE ] Refreshing pacman database cache.
>> [ INFO ] Installing archlinux package(s):.
>> [ DONE ] Installing ['editor']: emacs
>> [ DONE ] Installing ['terminal']: foot
>> [ DONE ] Installing ['email']: isync msmtp
>> [ DONE ] Installing ['security']: gnupg openssh yubikey-manager
>> [ DONE ] Installing ['versioning']: git
>> [ DONE ] Installing ['filemanager']: ranger
>> [ DONE ] Installing ['utils']: htop
>> [ INFO ] Installing AUR package(s):.
>> [ DONE ] Installing ['email']: mu
>> [ INFO ] Enabling and Starting service(s):.
>> [ DONE ] Enabling network: NetworkManager
>> [ DONE ] Starting network: NetworkManager
>> [ INFO ] Executing bash script(s):.
>> [ DONE ] Executing mkdir -p ~/.mail/franz
>> [ DONE ] Executing mkdir -p ~/.mail/jansen
>> [ DONE ] Executing mkdir -p ~/.mail/web
>> [ DONE ] Executing mbsync -a
>> [ DONE ] Executing mu init --maildir=~/.mail '--my-address=user@email.com'
>> [ DONE ] Executing mu index
>> [ INFO ] Check ~/tmp/install.log~ for full installation output.An example when there is no internet connection.
>> [ DONE ] Checking if AUR helper exists.
>> [ FAIL ] Refreshing pacman database cache.