Skip to content

crdant/dotfiles

Repository files navigation

Chuck's Dotfiles

A Nix-based system and home configuration management setup for macOS and Linux environments.

Overview

This repository contains dotfiles and system configurations managed using Nix, Home Manager, and nix-darwin. It provides a declarative, reproducible approach to configuring systems and user environments across multiple machines.

I've evolved this setup across many years, taking the Nix-based approach since early 2024. The earliest iteration was a couple of files, and it's evolved quite a bit since then. I've used custom shell scripts, adopted a lot from Pivotal's workstation setup, and used Strap by @MikeMcquaid.

All along, this repo kept evolving but never quite satisfied me. It was too for configs to drift and to get annoyed something was missing. Once I started to adopt Nix, I realized I could get closer to the repeatable setup I was looking for---even if it is probably overkill for one person with a handful of machines to be so pedantic about keeping things consistent and automated..

Though most of that evolution, I needed to keep things private in spite of how much I ahem borrowed ahem from others' shared dotfiles. Once I added SOPS support into my Nix setup, I realized I could finally start sharing.

Features

  • Complete system configuration via Nix Flakes
  • Support for both macOS (Darwin) and Linux (NixOS) systems
  • Multiple user profiles with different configurations
  • Secret management with sops-nix
  • Comprehensive development environment setup
  • Automated setup and management via Makefile

Directory Structure

  • /hosts - Host-specific configurations for different systems
  • /overlays - Nix overlays for package customization
  • /pkgs - Custom package definitions
  • /users - User-specific configuration files
  • /files - Utility scripts and shared files
  • /pki - Certificate files
  • /work - Work-specific configurations

Requirements

Installation

First-time Setup

  1. Install Nix:

    sh <(curl -L https://nixos.org/nix/install) --daemon
  2. Enable flakes by creating or editing ~/.config/nix/nix.conf:

    experimental-features = nix-command flakes
    
  3. Clone this repository:

    git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
    cd ~/.dotfiles
  4. Install configurations based on your needs:

    • For user configuration only:
      make <username>
    • For full system configuration:
      make <hostname>

Common Commands

Use the Makefile for common operations:

# Show available configurations
make show

# Apply current user's home configuration
make user

# Apply current host's system configuration
make host

# Update flake inputs
make update

# Check flake validity
make check

# Clean up [Nix](https://nixos.org) store
make clean

Customization

To customize configurations:

  1. Create or modify host configurations in /systems/hosts/<hostname>/
  2. Adjust user configurations in /home/users/<username>/
  3. Add custom packages to /pkgs/
  4. Create overlays in /overlays/

See the flake.nix file for the main configuration structure.

License

MIT License

Copyright (c) 2024 Chuck D'Antonio

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •