dotfiles  by ahmedelgabri

Nix-flake workstation configuration

Created 13 years ago
286 stars

Top 91.5% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a Nix-flake-powered personal workstation setup, primarily targeting Apple Silicon macOS with nix-darwin and Home Manager, and experimentally supporting NixOS. It serves as a single source of truth for system configuration, including OS settings, packages, shell, editor, terminal, automation, mail, and development tooling, offering a declarative and reproducible environment for Unix-like systems.

How It Works

The setup leverages Nix flakes for composable system configuration. Hosts are defined using small, reusable feature modules located in nix/parts/modules/, with application-specific configurations residing in config/. This modular approach, combined with nix-darwin for macOS and Home Manager for user environments, allows for a highly declarative and reproducible system build, simplifying bootstrapping and maintenance across machines.

Quick Start & Requirements

  1. Install Nix: Use the official installer: curl --proto '=https' --tlsv1.2 -sSfL https://artifacts.nixos.org/nix-installer | sh -s -- install.
  2. Font Prerequisite: The setup requires the commercial Pragmata Pro font. Add the font archive to the Nix store before the first rebuild: nix-store --add-fixed sha256 /path/to/PragmataPro<version>.zip. This can be removed or replaced if not using Pragmata Pro.
  3. Bootstrap: Run the repository directly from GitHub using nix --experimental-features 'nix-command flakes' run 'github:ahmedelgabri/dotfiles' -- <host>, where <host> is the target machine name (e.g., rocket, alcantara for macOS, nixos for NixOS). The script clones the repo locally on the first run.
  • Primary Target: Apple Silicon macOS (aarch64-darwin).
  • Experimental Target: NixOS (x86_64-linux).
  • Dependencies: Nix, Pragmata Pro font (commercial).

Highlighted Details

  • Manages a comprehensive suite of tools including Zsh, tmux, Neovim, Git, Hammerspoon, Karabiner-Elements, a full mail stack (aerc, notmuch, mbsync, msmtp), and AI/agent tooling.
  • Includes declarative management of Homebrew packages on macOS via nix-homebrew.
  • Provides reusable flake templates for various project types (Node, Deno, Bun, Python, Go, Rust).
  • Offers development shells (nix develop) and Nix code formatting (nix fmt).

Maintenance & Community

This repository is presented as a personal setup. No specific details regarding maintainers, community channels (like Discord or Slack), or sponsorship are provided in the README.

Licensing & Compatibility

The license is not explicitly stated in the provided text. Given the use of Nix and NixOS, it is likely to be an open-source license, but specific terms for commercial use or linking are not detailed.

Limitations & Caveats

The setup mandates the use of the commercial Pragmata Pro font, requiring manual user intervention to add it to the Nix store. The NixOS host configuration is marked as experimental. While structured for reusability, it originates as a personal configuration. Homebrew is still utilized for macOS GUI applications, albeit managed declaratively.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.