This is my NixOS configuration repository, managing all my machines and custom packages (i.e., not yet in nixpkgs). In a way, this repo is my world—hence the name. 🌍
It's built on Nix flakes, providing a declarative and reproducible way to manage systems—kind of like Cargo.toml
(Rust), go.mod
(Go), or package.json
(Node.js), but language-agnostic and handling any package or file. This setup ensures deterministic builds for both hosts and software.
For modularity, flake-parts is used to keep flake.nix clean and structured. 🛠️
To add a new machine, create a file in the relevant architecture folder under hosts/, copy an existing configuration if needed, and adjust as necessary. Then commit and push your changes. ✅
-
Download a recent NixOS installer and boot into it.
-
Enable flakes:
mkdir -p /etc/nix echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
-
Clone this repository:
cd /tmp git clone https://github.com/johnae/world cd world
-
Install the system:
host=eris nix build .#"$host"-diskformat ./result/bin/diskformat nixos-install --flake .#"$host" --no-root-passwd chown -R 1337:100 /mnt/keep/home/<your-user>
Hosts are defined in hosts/.
This setup is highly customized to my workflow. Feel free to use it, but you’ll likely want to tweak it for your needs.
Updates follow a standard commit/push/pull request workflow. To update a machine:
nixos-rebuild switch --flake github:johnae/world --use-remote-sudo
Or from a local clone:
git clone git@github.com:johnae/world
cd world
nixos-rebuild switch --flake . --use-remote-sudo
OS and package updates are automated via CI (buildkite). Updates create pull requests where all custom packages and machine configurations are built and tested before merging, helping catch issues before deployment.