REMOVE THIS PLACEHOLDER IMAGE
Cauldron is a collection of host and user declarations for my personal computing ecosystem, all managed using Nix.
...It's also the collective name for a colony of bats - my favorite animal and namesake!
Given it's personal nature, these files are in a constant state of flux as my needs grow and change. That said, I welcome any and all to find inspiration. It may be a little battered and rusted, but your sure to find the tools needed for any and all brews, witchcraft, and vampiric efforts - hopefully without the need for any sacrifices.
Nix allows for easy to manage, collaborative, reproducible deployments. This means that once something is setup and configured once, it works forever. If someone else shares their configuration, anyone can make use of it.
This repo, having previously tried other dotfile management tools, has settled on Nix - predominantly out of personal interest. Nix has been a fascinating rabbit hole, but be forewarned that it is not for beginners. Development is fast, documentation can be poor, but the reward of idempotent, declarative configuration is equally exciting.
For those wondering, "how do you configure X?" take a look at ./modules
. The majority of these are self-explanatory, though the syntax may not be. Raw dotfiles are kept within their associated user profile or the module itself.
Listed below are installation steps for each supported platform. These are subject to change and may be out of date, but are consolidated for ease. I highly recommend users view the individual documentation for each.
In summary, expect to install Nix, enable flakes, pull the repo, and then build and apply the output you're interested in.
Install Nix:
sh <(curl -L https://nixos.org/nix/install --darwin-use-unencrypted-nix-store-volume --daemon
Enable Nix Flakes support:
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
Install Nix-Darwin:
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
After cloning and moving to the project directory, build and apply using build package (for flake support), replacing <host>
with chosen host (listed in ./flake-parts/darwin.nix
):
nix build .#darwinConfigurations.<host>.system
./result/sw/bin/darwin-rebuild switch --flake .#darwinConfigurations.<host>
Enable Nix Flakes support:
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
After cloning and moving to the project directory, build and apply your chosen home-manager configuration, replacing <host>
with chosen host (listed in ./flake-parts/nixos.nix
):
sudo nixos-rebuild switch --flake .#nixosConfigurations.<host>
Install Nix:
sh <(curl -L https://nixos.org/nix/install --darwin-use-unencrypted-nix-store-volume --daemon
Enable Nix Flakes support:
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
Install Home Manager:
# Add the Nix Channel
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
# Update your path for Non-NixOS hosts
export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH}
# Install Home Manager
nix-shell '<home-manager>' -A install
After cloning and moving to the project directory, build and apply your chosen home-manager configuration, replacing <user@host>
with the chosen user and host (listed in ./flake-parts/darwin.nix
):
home-manager switch --flake .#homeManagerConfigurations.<user@host>
This project utilizes Just, an alternative to make
, to manage its build outputs. This is available by default within the project directory, through direnv
. Traditional outputs (eg. homeManagerConfigurations
, darwinConfigurations
, nixosConfigurations
) remain for troubleshooting and usage outside of just
.
Hostnames should be lowercase to ensure just
compatability.
Common commands (listable with just -l
) are:
just switch-home
: Build and apply home-manager output<user@host>
.just switch-darwin
: Build and apply nix-darwin outputdarwin-<host>
.just switch-nixos
: Build and apply NixOS outputnixos-<host>
.
Outputs should be named <nixos/darwin>-<host>
for nixosConfigurations
and darwinConfigurations
, while homeManagerConfigurations
are expected to be named <user>@<host>
. Examples of each can be found in their respective ./flake-parts
file.
Meanwhile, configuration files are available within ./profiles
, sorted by ./users
and ./hosts
. Option declarations can be found within ./modules
, nested under the matching path.
By default, the flake attempts to provide outputs by granularity. The highest matching level will be used, following a pattern of:
System < Host < User
Given just a system
(eg. aarch64-darwin
), the flake will apply configuration for aarch64-darwin
, using defaults for user
and host
details, applying them to the currently logged in user.
Simply forking the repo, adding your profiles
, and re-running the desired just
command will apply your new configurations wherever they are relevant.
Given the ephemeral nature of dotfiles, the given active toolset is likely to change on a whim. I highly encourage you take a look at ./modules
, as its quite well sorted and intended to be a running collection of all configurations I might need, with ./profiles
enabling and disabling as necessary.
On a high level:
Shell: | fish + a variety of utilities (bat, exa, fzf, zoxide) |
DM: | TBD |
WM: | (darwin) yabai + skhd + sketchybar (linux) TBD |
Editor: | VS Code (future): Doom Emacs |
Terminal: | (darwin): iTerm2 (windows): Windows Terminal (future): wezterm |
Launcher: | (darwin) Alfred (linux) TBD (windows) Flow Laucher |
Keyboard: | Corne v3 (Choc), Choc Purpz switches, Miryoku layout |
Browser: | Vivaldi |
Theme: | Dracula |
This repo has been heavily inspired by the excellent work of many other engineers, who have graciously shared their dotfile repos with the rest of us to tweak, modify, and steal to our hearts' content. Hopefully my addition will provide help and guidance for others as those engineers have for me. Please take a moment to view these projects, as Cauldron would not be possible otherwise.
- G6ai's Dotfiles
- Mathias Byren's Dotfiles
- Narze's Dotfiles
- Paul Irish's Dotfiles
- René-Marc Simard's Dotfiles
🦇 Assembled with 💜 in Denver, CO. 🦇