- Add nixos/ directory with declarative flake.nix and home.nix for NixOS - Make all setup scripts NixOS-aware with proper detection and early exit - Update bashrc, zshrc, and aliases with Go, Ruby on Rails, and Nix profile paths - Replace Rust/Cargo references in shell configs with rbenv/Ruby on Rails - Update README with NixOS quick start and full documentation
5.5 KiB
Fresh Install
This is a collection of scripts and dotfiles I use when setting up a fresh Linux installation. Now compatible with NixOS (declarative via flakes + home-manager), as well as traditional distributions like Fedora, Ubuntu, Debian, and Pop!_OS.
Quick Start
Traditional Distros (Fedora / Ubuntu / Debian / Pop!_OS)
Run the main setup script to install software, configure development tools, and symlink dotfiles:
./main-setup.sh
The script will automatically detect your Linux distribution and use the appropriate package manager.
NixOS
On NixOS, packages and configuration are managed declaratively using the flake in the nixos/ directory.
Run the main script for a guided workflow:
./main-setup.sh
Or apply the flake directly:
# Rebuild system configuration
sudo nixos-rebuild switch --flake ~/dotfiles/nixos#nixos
# Apply user-level configuration
home-manager switch --flake ~/dotfiles/nixos#blake
What Gets Installed
Core Packages
- Development tools:
git,gh,curl,wget,ripgrep,fd-find - System utilities:
btop,fastfetch,zsh,flatpak - Virtualization:
virt-manager - Python:
python3,python3-pip - Networking:
nmap,mtr,tcpdump,socat,whois,iperf3,traceroute - Cloud / DevOps:
kubectl,k9s,minikube,terraform,helm,direnv - HTTP:
curl,httpie
Development Environment
- Neovim (latest version from GitHub)
- Hack Nerd Font for terminal
- Oh My Zsh shell framework
- Oh My Posh prompt
- Go (Golang) with
goplslanguage server anddelvedebugger - Ruby on Rails — Ruby via rbenv, Bundler, Rails gem, Node.js
- Python development tools (pip, virtualenv, pynvim)
Fedora-Specific (.NET Development)
On Fedora systems, additional packages are installed:
- Visual Studio Code
- .NET SDK (with Microsoft repository)
- PostgreSQL server and tools
- Docker (moby-engine) with Docker Compose
Flatpak Applications (Traditional Distros Only)
- Bitwarden
- Discord
- Flatseal
- Podman Desktop
- ProtonUp-Qt
- Signal
- Steam
- Teams for Linux
- Thunderbird
- Visual Studio Code
- VLC Media Player
Modular Architecture
The setup is broken down into focused scripts:
00-system-prep.sh- System updates and Flathub setup (NixOS-aware)01-package-install.sh- Core packages and Flatpak apps (NixOS-aware)02-dev-tools-setup.sh- Development tools: Neovim, Hack Nerd Font, Go, Ruby on Rails, Oh My Posh, Helm, kubectx, stern, dive, trivy, AWS CLI (NixOS-aware)03-fedora-dotnet-setup.sh- Fedora-specific .NET environment (skipped on NixOS)04-config-symlinks.sh- Dotfile symlinking
You can run individual scripts if you only need specific components.
Dotfiles
The following configuration files will be symlinked to your home directory:
.vimrc&.vim/- Vim/Neovim configuration.zshrc&.zsh/- Zsh shell configuration.gitconfig- Git configuration (edit with your credentials).gitignore- Global Git ignore patterns.agignore- Silver Searcher ignore patterns.aliases- Shell aliases (fromaliases.zsh).gitmessage- Git commit template (fromcommit-conventions.txt)
Git Configuration
Important: Edit gitconfig and replace my credentials with yours before running the setup.
Vim/Neovim Setup
I use Neovim with vim-plug for plugin management. If you're using regular Vim, you may need to:
- Remove Neovim-specific plugins from
.vimrc - Run
:PlugCleanto remove plugin directories - Run
:PlugInstallto reinstall compatible plugins
Post-Installation Tasks
After running the setup, remember to:
-
Configure Git with your details:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com" -
Generate SSH key:
ssh-keygen -t ed25519 -C ${USER}@$(hostname --fqdn) -
Install Powerlevel10k gitstatus (if using):
~/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/install -f -
Log out and back in for Docker group changes to take effect (Fedora)
-
Install VS Code extensions (Fedora):
- C# Dev Kit
- GitLens
- Prettier
- NuGet Package Manager GUI
Supported Distributions
- NixOS — Declarative via
nixos/flake.nix+nixos/home.nix - Fedora (with full .NET development environment)
- Ubuntu/Debian (core packages and development tools)
- Pop!_OS (core packages and development tools)
NixOS Setup (nixos/)
The nixos/ directory contains a declarative flake-based configuration:
Files
-
nixos/flake.nix— NixOS system configuration:- System packages (Go, Ruby, Python, Kubernetes tools, networking tools)
- Docker, Flatpak, and virt-manager services
- Zsh as default shell
- Hack & FiraCode Nerd Fonts
- Neovim as default editor
-
nixos/home.nix— Home-manager user configuration:- User packages (Go tooling, Ruby on Rails, shell tools, cloud tools)
- Zsh aliases and environment (Go, Ruby/Rails, Kubernetes, Docker, AWS, Terraform)
- Git configuration with template and includes
- Dotfile symlinks (bashrc, zshrc, aliases, gitconfig, gitignore)
- Oh My Posh theme and Nushell config
Customization
Feel free to fork this repository and modify the scripts/dotfiles to suit your needs. The modular structure makes it easy to add, remove, or modify specific components.
Legacy
The original monolithic post_install.sh script has been archived in .archive/ for reference.