NIXX/DEVv1.14.0
ArticlesFavorites
Sign In
Sign In
Articles

Welcome to our blog

A curated collection of insightful articles, practical guides, and expert tips designed to simplify your workflow

Cover image for: Setting Up a Dev Machine from Scratch: A Proven Workflow
June 25, 20256 MIN READ min readBy ℵi✗✗

Setting Up a Dev Machine from Scratch: A Proven Workflow

A step-by-step guide to setting up a powerful, reproducible dev environment from the ground up—covering NixOS, Arch, tools, dotfiles, and more.

webdevproductivitylinux
ℵi✗✗

ℵi✗✗

Full-Stack Developer

Passionate about building tools and sharing knowledge with the developer community.

Was this helpful?

Popular Posts

  • NixOS vs. Arch Linux: Which One Belongs in Your Dev Setup?

    NixOS vs. Arch Linux: Which One Belongs in Your Dev Setup?

    5 MIN READ min read

  • How to Enable HTTPS on Localhost in Under 2 Minutes

    How to Enable HTTPS on Localhost in Under 2 Minutes

    3 MIN READ min read

  • Migrating from Create React App (CRA) to Vite: A Step-by-Step Guide

    Migrating from Create React App (CRA) to Vite: A Step-by-Step Guide

    4 MIN READ min read

  • Array Destructuring in PHP: A Practical Guide for Modern Developers

    Array Destructuring in PHP: A Practical Guide for Modern Developers

    5 MIN READ min read

Recommended Products

  • Apple iPad (7th Gen)

    Apple iPad (7th Gen)

    4.3
  • Fitbit Versa 4

    Fitbit Versa 4

    4.3
  • JBL Flip 6

    JBL Flip 6

    4.8
  • Dell 24 Monitor — SE2425HM Full HD

    Dell 24 Monitor — SE2425HM Full HD

    4.7

May contain affiliate links

Topics

webdev33productivity16cybersecurity12javascript11automation9guide8react7typescript7php6tutorial6freelancing5github actions5privacy5how to4Node.js4
+111 more topics →
🇺🇸USD ACCOUNTOpen a free US-based USD accountReceive & save in USD — powered by ClevaSponsoredInterserver Hosting#1 VALUEAffordable, reliable hosting from $2.50/mo99.9% uptimeSponsored

Setting up a development machine well takes time the first time. Done right, it pays back that investment on every subsequent setup. The goal is a configuration that is version-controlled, reproducible, and fast to apply to a new or rebuilt machine without retracing the same decisions from memory.

This guide covers the full process from OS selection through to automation: choosing between NixOS and Arch Linux, installing core tools, managing dotfiles, configuring the shell and editor, and scripting or flaking the setup so it can be replicated in under an hour.

What this covers:

  • OS selection: NixOS vs. Arch Linux

  • Installation quickstart for both

  • System configuration basics

  • Package management and essential tools

  • Dotfiles management with Git and GNU Stow or Nix modules

  • Shell setup with Zsh and Oh My Zsh

  • IDEs, editors, and language runtimes

  • Automating the setup with scripts or Nix Flakes

  • Backup and cross-machine sync strategies


Step 1: Choose Your OS

The OS shapes every other decision in the setup. For developers who want fine-grained control, NixOS and Arch Linux are the two most capable options in different directions.

NixOS is the better fit if reproducibility is a priority. The entire system is defined in a single configuration file. Rebuilding the same environment on another machine means copying that file and running one command. Atomic rollbacks are built in, which makes it safe to experiment with configuration changes. It works well for teams sharing development environments and for CI/CD pipelines that need consistent build contexts.

Arch Linux is the better fit if direct control and current software matter most. The base install is intentionally minimal, and every component beyond it is a deliberate choice. The rolling release model keeps packages current. The Arch Wiki is one of the best technical references in Linux. It suits developers who want to understand each layer of the system rather than declare it.

Feature

NixOS

Arch Linux

Package manager

Nix

Pacman and AUR

System configuration

Declarative (configuration.nix)

Manual (/etc)

Rollback support

Built-in

Requires third-party tooling

Learning curve

Steep (new paradigm)

Very steep (requires Linux knowledge)


Step 2: Install the OS

NixOS

  1. Boot from the USB installer

  2. Partition the disk using cfdisk or parted

  3. Format and mount the root partition:

sudo mkfs.ext4 /dev/sdaX
sudo mount /dev/sdaX /mnt
  1. Generate the initial configuration and edit it:

sudo nixos-generate-config --root /mnt
sudo nano /mnt/etc/nixos/configuration.nix
sudo nixos-install
  1. Reboot into the new system

The NixOS manual covers hardware-specific edge cases in detail.

Arch Linux

  1. Boot from the USB installer

  2. Connect to the internet via Ethernet or iwctl for WiFi

  3. Partition and format disks

  4. Mount root and install the base system:

pacstrap /mnt base linux linux-firmware
  1. Generate fstab and chroot:

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
  1. Configure the bootloader, locale, hostname, and user account

The Arch Installation Guide on the wiki is the authoritative reference and is kept current.


Step 3: Configure System Settings

With the OS installed, a short list of base configuration tasks applies to both distributions.

Hostname:

echo "my-dev-machine" > /etc/hostname

Timezone:

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime

Locale: Uncomment the target language in /etc/locale.gen, then run locale-gen.

User account:

useradd -m -G wheel -s /bin/bash yourusername
passwd yourusername

Sudo access: Install sudo, add the user to the wheel group, and enable wheel in /etc/sudoers via visudo.

SSH keys: Generate a new key pair or copy existing keys from backup:

ssh-keygen -t ed25519 -C "[email protected]"
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_ed25519

Step 4: Install Essential Tools

Install the core tools before configuring anything else. These are the dependencies that everything downstream relies on.

NixOS

Add to environment.systemPackages in configuration.nix:

environment.systemPackages = with pkgs; [
  git
  zsh
  tmux
  neovim
  curl
  wget
  openssh
  ripgrep
  fzf
];

Apply:

sudo nixos-rebuild switch

Arch Linux

sudo pacman -S git zsh tmux neovim curl wget openssh ripgrep fzf

For packages not in the official repositories, install yay or paru to manage AUR packages:

paru -S exa bat fd

Step 5: Manage Dotfiles

Dotfiles are the configuration files that define the behavior of every tool in the environment. Version-controlling them means the environment can be reproduced exactly, and changes are tracked over time.

Option 1: Git and GNU Stow

Create a ~/dotfiles directory and organize configuration files by tool. GNU Stow creates symlinks from the dotfiles repository to the expected locations:

cd ~/dotfiles
stow zsh      # creates ~/.zshrc symlink
stow tmux     # creates ~/.tmux.conf symlink
stow nvim     # creates ~/.config/nvim/ symlinks

This is the most portable approach. The same dotfiles repository works on any Linux or macOS machine with Git and Stow installed.

Option 2: NixOS Home Manager

On NixOS, home-manager manages dotfiles declaratively as part of the system configuration:

home.file.".zshrc".source = ./dotfiles/.zshrc;
home.file.".tmux.conf".source = ./dotfiles/.tmux.conf;

Apply with sudo nixos-rebuild switch. This integrates dotfile management into the same workflow as package installation and system configuration.


Step 6: Shell Setup

Zsh with Oh My Zsh is covered in detail in the dedicated Zsh setup guide. The short version:

Install and Set Zsh as Default

On Arch:

sudo pacman -S zsh
chsh -s $(which zsh)

On NixOS, add zsh to environment.systemPackages and set it in users.users.yourusername.shell = pkgs.zsh.

Install Oh My Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

For faster startup times, Zimfw is a lighter alternative:

curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh

Configure .zshrc

Essential aliases:

alias ll='ls -la'
alias g='git'
alias ..='cd ..'

Environment variables:

export EDITOR=nvim
export PATH="$HOME/.local/bin:$PATH"

Enable zsh-autosuggestions and zsh-syntax-highlighting for a more productive command line experience. Both require cloning to the Oh My Zsh custom plugins directory before adding them to the plugins list.


Step 7: Editors and Language Runtimes

VS Code

On Arch:

sudo pacman -S code

On NixOS:

environment.systemPackages = with pkgs; [ vscode ];

JetBrains Toolbox

The Toolbox manages JetBrains IDE installations and updates across versions. Install via AUR on Arch or download directly from jetbrains.com/toolbox-app.

Language Runtimes

Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Go:

sudo pacman -S go

Python:

sudo pacman -S python python-pip

Use pyenv if multiple Python versions are needed across projects.

Docker:

sudo pacman -S docker
sudo systemctl enable --now docker
sudo usermod -aG docker $USER

Log out and back in for the group change to take effect.


Step 8: Automate the Setup

Documenting the setup is the minimum. Automating it means a new machine reaches a working state without manual steps beyond running a single script.

Bash Script for Arch

#!/bin/bash
sudo pacman -Syu --noconfirm git zsh tmux neovim ripgrep fzf
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/yourname/dotfiles.git ~/dotfiles
cd ~/dotfiles && stow zsh tmux nvim
chsh -s $(which zsh)

Commit this script to the dotfiles repository so it is available on any new machine after cloning.

Nix Flakes for Reproducible Environments

Nix Flakes pin all dependencies to specific versions, making the environment exactly reproducible:

{
  description = "My dev environment";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

  outputs = { self, nixpkgs }: {
    packages.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.buildEnv {
      name = "dev-env";
      paths = with nixpkgs.legacyPackages.x86_64-linux; [
        git
        zsh
        tmux
        neovim
        vscode
      ];
    };
  };
}

Build and activate:

nix build .#default
source result/setup.bash

Flakes are particularly useful for CI pipelines and team environments where everyone needs the same tool versions.


Bonus: Backup and Cross-Machine Sync

Backup Strategies

The dotfiles repository covers application configuration. For full system recovery, filesystem snapshots with Btrfs or ZFS provide point-in-time recovery. On systems without those filesystems, timeshift or snapper offer similar functionality.

Syncing Across Machines

For dotfiles that need to work across different operating systems or machine configurations, chezmoi handles templating and conditional logic that GNU Stow does not:

paru -S chezmoi
chezmoi init https://github.com/yourname/dotfiles.git
chezmoi apply

NixOS users can manage cross-machine configuration through a shared flake with per-host specialisations, which is the most reproducible approach available.


Key Takeaways

  • NixOS suits developers who need reproducibility and atomic rollbacks; Arch suits those who want direct control and current software.

  • Both distros benefit from a version-controlled dotfiles repository applied early in the setup.

  • GNU Stow is the most portable dotfiles management approach; Nix Home Manager is the most integrated option on NixOS.

  • Automating the setup with a script or Nix Flake turns a multi-hour manual process into a single command on subsequent machines.

  • Backing up dotfiles to a Git repository and taking filesystem snapshots covers both configuration recovery and full system recovery.


Conclusion

A development environment set up with version control, automation, and portability in mind is an investment that pays back on every machine migration, rebuild, or team onboarding. The first setup takes longer. Every subsequent one is faster and more reliable than starting from memory.

The practices here, particularly dotfiles management and setup automation, apply regardless of OS choice. They scale from a solo developer to a team where consistent environments matter for build reproducibility.


Have a specific tool or automation trick that has made your setup more reproducible? Share it in the comments.

Topics
webdevproductivitylinux
Interserver Hosting#1 VALUEAffordable, reliable hosting from $2.50/mo99.9% uptimeSponsored

Discussion

Join the discussion

Sign in to share your thoughts and engage with the community.

Sign In
Loading comments…

Continue Reading

More Articles

View all
Cover image for: Build a Fun Alphabet Reader with TypeScript, Vite & Speech Synthesis API
Jun 27, 20254 MIN READ min read

Build a Fun Alphabet Reader with TypeScript, Vite & Speech Synthesis API

An interactive, educational project for beginners to learn modern frontend development.

Cover image for: The 3-Device Rule: How to Simplify Your Digital Life and Stop Overbuying Tech
Aug 5, 20255 MIN READ min read

The 3-Device Rule: How to Simplify Your Digital Life and Stop Overbuying Tech

Tired of juggling too many devices? Learn the 3-device rule that helps you streamline your digital life, reduce clutter, and focus on what really matters.

Cover image for: AI for DevOps: Tools That Are Already Changing the Game
Jun 17, 20256 MIN READ min read

AI for DevOps: Tools That Are Already Changing the Game

How artificial intelligence is transforming CI/CD pipelines, monitoring, and incident response—today.

Cover image for: Why You Should Use TypeScript in Every JavaScript Project
Jul 23, 20255 MIN READ min read

Why You Should Use TypeScript in Every JavaScript Project

JavaScript gets the job done—but TypeScript helps you write cleaner, safer, and easier-to-maintain code. Here’s why it’s worth using everywhere.

|Made with · © 2026|TermsPrivacy
AboutBlogContact

Free, open-source tools for developers and creators · Community driven