This repository contains the Nix code that builds my systems using flake-parts. None of these NixOS and Darwin configurations will work out of the box for you (unless you have my keys 😱).
This repo is intended for sharing some interesting parts of my infra and for some inspiration for how I was inspired myself based on other similar repos.
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 flake is configured using flake-parts for a modular approach.
/nixos
- NixOS configurations/nixos/hosts/x86_64
- x86_64 NixOS hosts- tl-wsl - WSL system
- depsos - Server for publically hosted services
- nas - NAS with some multimedia stuff
- sirius - Home Assistant and 3D printer coordination
/nixos/hosts/aarch64
- aarch64 NixOS hosts- 3D Printers:
- voron - Voron 2.4 300mm
- vzbot235 - VzBot 235
- tiny-m - Tiny-M 150mm
- Misc:
- oracle - Game servers and remote builder
- 3D Printers:
/darwin
- Darwin configurations/darwin/hosts
- aarch64-darwin hosts- suadbook - Main workstation
- tl-mm4 - aarch64-darwin and aarch64-linux builder
/home
- Home-manager configurations/parts
- flake-parts modules/parts/klipper
- Klipper 3D printer related configurations/parts/raspberry-pi
- Raspberry Pi specific configurations/parts/rockchip
- Rockchip SoC configurations/parts/k8s
- K3S wrappers and version pinning/parts/minecraft-servers
- Minecraft server configurations
/profiles
- Shared system profiles/lib
- Helper functions and utilities/secrets
- Encrypted secrets (using sops-nix)/shell
- Development shell configurations
For NixOS hosts, you can use deploy-rs to deploy configurations:
deploy --skip-checks '.#<hostname>'
For macOS hosts running nix-darwin:
# First-time setup - bootstrap aarch64-linux builder
nix run github:nixos/nixpkgs/nixpkgs-23.11-darwin#darwin.linux-builder
nix build --builders 'builder@localhost aarch64-linux /etc/nix/builder_ed25519' .#darwinConfigurations.<hostname>.system
# Switch configuration (local)
darwin-rebuild switch --flake .#<hostname>
# Switch configuration (remote)
deploy --skip-checks '.#<hostname>'
A development shell is available with useful utilities:
nix develop
- hercules-ci/flake-parts - Core of this flake.
- LnL7/nix-darwin - Darwin hosts management.
- nix-community/NixOS-WSL - WSL support for NixOS.
- nix-community/home-manager - Dotfiles and user management.
- serokell/deploy-rs - Deployment tool for all the hosts.
- Mic92/sops-nix - Secrets management.
- numtide/devshell - Shell environment for all the tools for this flake.
- nix-community/nixago - Repo config file management.
- berberman/nvfetcher - Source version management.
- nix-community/haumea - Filesystem-based module system.
- nixos/nixos-hardware - Useful hardware-configuration modules.
- nabam/nixos-rockchip - Useful modules for Rockchip SoCs.
- nix-community/pyproject.nix - Python libraries fetching for certain packages.
- nix-community/nix-vscode-extensions - VSCode extensions management.
- nix-community/nixos-vscode-server - VSCode server fixes for NixOS.
- linyinfeng/dotfiles - Big inspiration for this flake structure and some library functions.
This is a third iteration of repository structure. You can find previous attempts here: