This repo contains Ansible playbooks to configure your system as a development machine after a clean install.
The playbooks have been tested on:
- Fedora Workstation 44
Summary of packages that get installed and configured based on roles:
-
role: harden_system
- Remove the
passimpackage and stop thepassimdservice from listening on 0.0.0.0 - Disable Link-Local Multicast Name Resolution (LLMNR) listening on 0.0.0.0
- Create and activate a new
firewalldzoneFedoraWsHardened, which DROPS all incoming requests - Enable automatic security updates via
dnf5-plugin-automatic
- Remove the
-
role: base
- Enable the
firewalldfirewall - Tune system swappiness to greatly reduce swapping
- Upgrade all packages
- Install archiving tools like zip, rar, etc.
- Install LibreOffice
- Install Foliate, an e-book reader
- Install Obsidian markdown editor
- Install power management tools like Powertop
- Install development tools like android-tools, httpie, golang, poetry, etc.
- Install Podman as the container runtime (rootless, daemonless)
- Install code formatters and linters like ruff, ansible-lint, etc.
- Set up golang directories
- Install download tools like axel, transmission, wget, aria2
- Install image, audio, and video tools like VLC, Totem, GIMP, ImageMagick, etc.
- Option to turn on Night Light for eye comfort (set
base_permanent_night_light.night_light_enabledtotrueingroup_vars/all/base.yml) - Enable
fzffuzzy finder in the Zsh terminal - Install terminal emulator Alacritty
- Set GNOME color-scheme to dark mode
- Enable the
-
role: zsh
- Install the Zsh package and set the user shell to Zsh
- Install zinit Zsh plugin manager
- enable Zsh pure theme
- enable Zsh syntax highlighting, autosuggestions, and completions
- some other ohmyzsh plugins like git, python, clipboard utls, etc
- Install ohmyzsh/ohmyzsh and enable bundled plugins
- Copy and enable a sample
~/.zshrcfile if one doesn't exist- Includes a function to stop
ssh-agentfrom repeatedly asking for encrypted SSH key passwords in new terminals - Adds additional aliases, functions, and variables in
~/.shell_aliases.sh,~/.shell_functions.sh, and~/.shell_variables.shfor use in interactive sessions
- Includes a function to stop
-
role: terminal_customizations
- Download and install Nerd Fonts from ryanoasis/nerd-fonts; ideal for terminal and programming editors
- Copy and enable a sample Alacritty terminal config file
- Copy and enable a sample Tmux config file if one doesn't exist
- Copy and enable
~/.tmux.confwith tmux plugin manager and several plugins- Open Alacritty and run the
tmuxcommand, or enable a custom command option in Alacritty - Edit
~/.tmux.confas needed
- Open Alacritty and run the
-
role: neovim (optional)
- Install Neovim packages
- Install LazyVim Neovim distribution
- Open
nvimfrom terminal; plugins will install automatically on first launch
- Open
-
role: vscode
- Add the Visual Studio Code DNF repo
- Install Visual Studio Code
- Install popular extensions
-
role: privacy
- Install Tor
- Configure Tor to run at boot and avoid certain countries as exit nodes
- Edit
/etc/tor/torrcif needed
- Edit
- Install ProxyChains
- Configure ProxyChains to use Tor. See my Medium story for usage
- Edit
/etc/proxychains.confif needed
- Edit
- Install a metadata anonymization toolkit
-
role: security
- Install ClamAV (antivirus) and its GNOME interface. Run scans manually via Nautilus or CLI using
clamscan;clamdis not installed due to high memory usage - Install Firejail for sandboxing applications
- Install ClamAV (antivirus) and its GNOME interface. Run scans manually via Nautilus or CLI using
-
role: virtualization
- Install and configure QEMU and KVM with libvirt (only on bare metal, skipped if running in a VM)
- set up an isolated network
virbr6910.69.69.0/24in addition to the default NAT network - set up additional storage pools
isosandtemplateswith correct SELinux contexts
- set up an isolated network
- Install and configure QEMU and KVM with libvirt (only on bare metal, skipped if running in a VM)
-
role: googlechrome (optional)
- Add the Google Chrome DNF repo
- Install Google Chrome
On the system you are about to configure using Ansible, perform the following:
Install ansible and git first:
/usr/bin/sudo dnf update -y
/usr/bin/sudo dnf install ansible git -ygit clone https://github.com/FazleArefin/fedora-dev-machine-setup.git
cd fedora-dev-machine-setupRun the following as yourself (the primary user), not as root:
ansible-playbook main.yml -vv --ask-become-pass
# Optional roles (e.g. googlechrome) are skipped by default. Append `--tags never` to install them.Enter your sudo password when prompted for BECOME password:.
The main.yml playbook can take between 15 minutes to an hour to finish.
Once complete, reboot your laptop for all changes to take effect.
- If the Ansible playbook stops mid-way, rerun it. Most tasks are idempotent, so re-execution is safe.
- If your terminal displays strange characters after installing a Zsh theme, change the font to a Nerd Font in the terminal's settings.
- If you dislike fuzzy finder completions, comment out the
#fzfline in your~/.zshrc(this is a feature, not a bug).
Pull requests are welcome! However, this repo is tailored to my own development needs. For your own workflow, it's probably better to fork it and customize as you like.