Skip to content

davidmogar/ok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An Ansible playbook to configure an Arch Linux workstation

UsageRolesThemingLicense

This Ansible playbook installs and maintain all the packages and dotfiles I use in my development environment. It is based on roles and prepared to work over a fresh Arch Linux installation.

Usage

The following command is all you need to have it ready to roll:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/davidmogar/ok/master/ok.sh)"

And in case of using wget:

sh -c "$(wget -O- https://raw.githubusercontent.com/davidmogar/ok/master/ok.sh)"

Applying a specific profile and/or tag

A specific profile can be applied by setting the PROFILE variable before the bootstraping commands. The definition of these profiles can be found in the host_vars directory. If no profile is specified, the generic profile will be applied. The following example shows how to use this variable:

PROFILE=zoidberg sh -c "$(curl -fsSL https://raw.githubusercontent.com/davidmogar/ok/master/ok.sh)"

It is also possible to run only specifc parts by using the --tags options. For example, the following command will only run the bootstrap tasks, which will prepare the repositories and install some required packages:

PROFILE=zoidberg TAGS=bootstrap sh -c "$(curl -fsSL https://raw.githubusercontent.com/ok/dotfiles/master/ok.sh)"

Running the playbook manually

Once the system has been bootstrapped, a copy of the git repository will be placed in ${HOME}/.ansible/dotfiles. To apply the playbook manually from that repository, execute the following commands:

cd ~/.ansible/dotfiles
git pull origin master
ansible-playbook -i inventory playbook.yml --diff [--limit PROFILE] [--tags TAGS] --ask-become-pass

Note that both, limit and tags, are optional arguments.

Roles

Name Description
alacritty Installs Alacritty.
aur Manages the installation of AUR packages.
bspwm Installs bspwm and set up the wallpaper by using feh.
chromium Installs Chromium.
cht-sh Installs cheat.sh's CLI.
cli-utilities Installs a curated list of CLI utilities.
cursor Installs and configures the default cursor.
dunst Configures system notifications to use dunst. The flag enable-native-notifications is required to get native notifications with Chromium.
fonts Installs a curated list of fonts.
gtk Installs gtk3 and the default theme.
lastpass Installs lastpass-cli.
lightdm Installs lightdm and the lightdm-webkit2 greeter.
mirrorlist Configures pacman's mirrorlist by using Reflector.
neofetch Installs neofetch.
neovim Installs Neovim.
picom Installs picom compositor.
polybar Installs polybar.
qutebrowser Installs qutebrowser.
rofi Installs rofi.
sound Installs packages to manage system's sound.
spotify Installs Spotify and spicetify-cli. Spotify is made wm-friendly through spotifywm.
sudo Configures sudoers file.
sxhkd Installs sxhkd and sets key bindings.
user Manages the creation of users.
vifm Installs vifm.
vscode Installs VS Code.
xdg-user-dirs Configures default directories, allowing to point them to external volumes.
xorg Installs Xorg.
zathura Installs zathura.
zsh Installs zsh along with autosuggestions and syntax-highlighting plugins.

Theming

Some of the roles defined above allow to change their theme, affecting the look of the installed applications. This theme can be selected by defining an existing value for the theme variable:

theme: dmg_blue

The list of available themes can be checked by listing the files inside the files/themes directory in any customizable role such as alacritty.

License

This project is under the GNU General Public License v3.0. Check LICENSE file to see the full text full text.