A set of NixOS modules for building your own on-premise cloud (according to a hobbyist).
🚧 Under Construction 🚧
This is undergoing a rewrite to incorporate learnings from a few years of working with NixOS. See ye-olden-days for a more elaborate, albiet messy example.
The router module configures a router (nat, dhcp, dns, ...) and manages the network for everything else in the lab.
The file storage module manages ZFS pools and datasets. A host profile attaches Syncthing and adds snapshotting.
platforms/nixos/modules/lab: Unopinionated "library" modules for building a home lab.platforms/nixos/tests: Virtual machine tests for services inmodules/lab.platforms/nixos/modules/lab/profiles: Opinionated configurations.hosts: Per-host configurations. They are thin wrappers around profiles.
Tests can be executed by entering a dev shell and running project test <drv_path>:
# Example:
project test filesystems.zfsTo cripple your machine by running all tests, do:
nix build --verbose '.#tests'The Nix Tradition is reading source code until you figure it out. Here are resources that helped me.