Skip to content

aywrite/nix-config

Repository files navigation

Andrew Wright's Dotfiles/Nix Config

I use nix and home manager with flakes to manage my applications and dotfiles.

I use zsh as my main shell, customized using oh-my-zsh.

Terminal.app

Installation

This repository contains user configuration deployed using Home Manager with Nix flakes. The configuration is organized into modular components that can be mixed and matched for different machines and roles.

Quick Start

  1. Clone and install:
curl -L https://raw.githubusercontent.com/aywrite/nix-config/master/install.sh | bash
  1. Switch to your configuration:
cd ~/.config/nixpkgs

# For WSL:
home-manager switch --flake .#awright-wsl

# For XPS 13 with Sway:
home-manager switch --flake .#awright-xps13

# For Work MacBook:
home-manager switch --flake .#awright-work-mbp

Configuration Structure

The configuration is organized into several directories:

  • programs/: Contains default settings for various programs & tools
  • machines/: Machine-specific configurations (hardware, display, etc.)
  • users/: User-specific configurations (git config, personal preferences)
  • roles/: Role-based configurations that set up specific environments:
    • ubuntu-wsl.nix: Configuration for WSL environment
    • sway-laptop.nix: Configuration for Sway window manager on laptops
    • darwin-laptop.nix: Configuration for macOS environments

Base Configuration

All machine configurations inherit from a base configuration in home.nix which sets up core Home Manager settings. Machine-specific configurations then add their own modules and roles on top of this base.

Available Profiles

  1. WSL Profile (awright-wsl):

    • Base configuration
    • Personal user settings
    • WSL-specific adaptations
  2. XPS 13 Profile (awright-xps13):

    • Base configuration
    • Personal user settings
    • Sway window manager setup
    • Laptop-specific configurations
  3. Work MacBook Profile (awright-work-mbp):

    • Base configuration
    • Work user settings
    • macOS-specific adaptations
    • Work-related tools and configurations

Customize

Local Settings

The dotfiles can be easily extended to suit additional local requirements by using the following files:

~/.zsh.local

If the ~/.zsh.local file exists, it will be automatically sourced. This allows the use of environment variables to store secrets without checking them in.

Acknowledgements

Config

Window Manager

Scripts

Themes

For a colour palette I generally stick to Solarized (Dark).

I use oh-my-zsh to manage my shell theme, the current theme I am using is a slightly modified version of 𝝺 Pure with the formating of git status from Spaceship Prompt.

My old theme (andrew) was based on the agnoster which is the default with oh-my-zsh.

TODO

  • Configure restic
  • Write an install script with template/prompts to generate home.nix
  • Figure out how best to manage root user

Apps to add

  • spotify
  • 1password
  • iterm (mac)
  • rvm
  • nvm
  • virtualenv wrapper

Themes

The following are repos/articles I want to look at which I might use ideas from:

About

Dotfiles managed via nix/home-manager

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published