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.
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.
- Clone and install:
curl -L https://raw.githubusercontent.com/aywrite/nix-config/master/install.sh | bash- 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-mbpThe 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 environmentsway-laptop.nix: Configuration for Sway window manager on laptopsdarwin-laptop.nix: Configuration for macOS environments
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.
-
WSL Profile (
awright-wsl):- Base configuration
- Personal user settings
- WSL-specific adaptations
-
XPS 13 Profile (
awright-xps13):- Base configuration
- Personal user settings
- Sway window manager setup
- Laptop-specific configurations
-
Work MacBook Profile (
awright-work-mbp):- Base configuration
- Work user settings
- macOS-specific adaptations
- Work-related tools and configurations
The dotfiles can be easily extended to suit additional local requirements by using the following files:
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.
- The organisation of my nix files are based on Hugo Reeves' blog post
- Some of the ideas and files for my nix configuration are based on Daniel K's - nix-home
- My original dotfiles (pre nix) were based on Nick Plekhanov's Dotfiles
- My xmonad & xmobar configuration is mostly based on Ethan Schoonover's - dotfiles-tilingwm
- Sway configuration takes some inspiration from - https://github.com/Robinhuett/dotfiles/blob/master/.config/sway/config
- Brightness script based on the script by Jon Gjengset
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.
- Configure restic
- Write an install script with template/prompts to generate home.nix
- Figure out how best to manage root user
- spotify
- 1password
- iterm (mac)
- rvm
- nvm
- virtualenv wrapper
The following are repos/articles I want to look at which I might use ideas from:
