My personal NixOS configuration managing all my machines and custom packages using Nix flakes. Provides declarative, reproducible system management across NixOS, nix-darwin (macOS), and home-manager only (non-NixOS Linux)—like Cargo.toml or package.json but language-agnostic.
This repo is my working environment—it's not a framework or template, but others might find ideas worth borrowing.
For modularity, flake-parts is used to keep flake.nix clean and structured.
world/
├── configurations/ # Machine-specific configurations
│ ├── nixos/ # NixOS systems (by architecture)
│ ├── darwin/ # nix-darwin (macOS) systems
│ ├── home/ # home-manager only (non-NixOS Linux)
│ └── microvms/ # MicroVM configurations
├── profiles/ # Reusable system profiles (server, desktop, laptop)
├── modules/ # Custom NixOS/nix-darwin/home-manager modules
├── users/ # User configurations (home-manager profiles)
├── packages/ # Custom packages not in nixpkgs
├── secrets/ # Encrypted configuration (agenix)
├── flake/ # Flake components (organized with flake-parts)
└── flake.nix # Main flake definition
For detailed development guidelines, see DEVELOPMENT.md.
world CLII built a custom CLI wrapper (based on a Justfile) for common tasks:
# Search for packages
world search <package>
# Open shell with packages
world shell <packages>
# Update system
world upgrade
# Build without switching
world build
# Garbage collect
world gc
# Run linters
world lint
# Check flake
world check
Flakes must be enabled:
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
From GitHub using world cli:
world upgrade
From local clone using world cli:
world upgrade .
From GitHub using nix cli:
nixos-rebuild switch --flake github:johnae/world --use-remote-sudo
From local clone using nix cli:
nixos-rebuild switch --flake . --use-remote-sudo
Notes for myself when provisioning a new host:
configurations/<type>/<arch>/<hostname>.nixhost=yourhostname
nix build .#"$host"-diskformat
./result/bin/diskformat
nixos-install --flake .#"$host" --no-root-passwd
The configuration follows a layered approach:
profiles/defaults.nix)This is highly specific to my setup, but if you want to adapt parts:
configurations/<type>/<arch>/, adjust hardware configusers/profiles/This repo includes some experimental work like MicroVM configurations for container workloads, but these aren't actively used and may not be fully functional.
Note: This is a personal configuration that's highly customized to my workflow. Feel free to browse and borrow ideas, but you'll want to adapt it significantly for your own use.
146 followers · starred Nov 2021
156 followers · starred May 2023
69 followers · starred Apr 2022
417 followers · starred Nov 2024
My personal NixOS configuration managing all my machines and custom packages using Nix flakes. Provides declarative, reproducible system management across NixOS, nix-darwin (macOS), and home-manager only (non-NixOS Linux)—like Cargo.toml or package.json but language-agnostic.
This repo is my working environment—it's not a framework or template, but others might find ideas worth borrowing.
For modularity, flake-parts is used to keep flake.nix clean and structured.
world/
├── configurations/ # Machine-specific configurations
│ ├── nixos/ # NixOS systems (by architecture)
│ ├── darwin/ # nix-darwin (macOS) systems
│ ├── home/ # home-manager only (non-NixOS Linux)
│ └── microvms/ # MicroVM configurations
├── profiles/ # Reusable system profiles (server, desktop, laptop)
├── modules/ # Custom NixOS/nix-darwin/home-manager modules
├── users/ # User configurations (home-manager profiles)
├── packages/ # Custom packages not in nixpkgs
├── secrets/ # Encrypted configuration (agenix)
├── flake/ # Flake components (organized with flake-parts)
└── flake.nix # Main flake definition
For detailed development guidelines, see DEVELOPMENT.md.
world CLII built a custom CLI wrapper (based on a Justfile) for common tasks:
# Search for packages
world search <package>
# Open shell with packages
world shell <packages>
# Update system
world upgrade
# Build without switching
world build
# Garbage collect
world gc
# Run linters
world lint
# Check flake
world check
Flakes must be enabled:
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
From GitHub using world cli:
world upgrade
From local clone using world cli:
world upgrade .
From GitHub using nix cli:
nixos-rebuild switch --flake github:johnae/world --use-remote-sudo
From local clone using nix cli:
nixos-rebuild switch --flake . --use-remote-sudo
Notes for myself when provisioning a new host:
configurations/<type>/<arch>/<hostname>.nixhost=yourhostname
nix build .#"$host"-diskformat
./result/bin/diskformat
nixos-install --flake .#"$host" --no-root-passwd
The configuration follows a layered approach:
profiles/defaults.nix)This is highly specific to my setup, but if you want to adapt parts:
configurations/<type>/<arch>/, adjust hardware configusers/profiles/This repo includes some experimental work like MicroVM configurations for container workloads, but these aren't actively used and may not be fully functional.
Note: This is a personal configuration that's highly customized to my workflow. Feel free to browse and borrow ideas, but you'll want to adapt it significantly for your own use.
146 followers · starred Nov 2021
156 followers · starred May 2023
69 followers · starred Apr 2022
417 followers · starred Nov 2024