nixos-flake a flake-parts module to unify NixOS + nix-darwin + home-manager configuration in a single flake, while providing a consistent interface (and enabling common modules) for both Linux and macOS.
Why?
nixos-flake provides the following features:
-
Activation: An
.#activate
flake app that works both on macOS and NixOS.-
.#activate
can also remotely activate machines (be it macOS or NixOS) over SSH.
-
-
All NixOS/ nix-darwin/ home-manager modules receive
specialArgs
which includes all the information in the top-level flake.- This enables those modules to be aware of the flake inputs, for instance.
-
A
.#update
flake app to update the primary inputs (which can be overriden)
Getting Started
See: Getting Started and Guide. For examples, see Examples