{"all_yanked":false,"avatar_url":"https://avatars.githubusercontent.com/u/181582751","created_at":"2026-07-14T10:10:22.049358Z","description":"Purr — a lean Nix flake library","download_url":"https://api.flakehub.com/f/nixcafe/purr/0.1.106+rev-4f5ea66ed5b00f4471bbc9a63f7903dcc563d218.tar.gz","labels":["module-system","flake-framework","flake-parts","auto-discovery","nix","nix-flake"],"mirrored":false,"org":"nixcafe","outputs":{"checks":{"doc":"The `checks` flake output contains derivations that will be built by `nix flake check`.\n","name":"checks","outputs":[{"outputs":[{"doc":null,"for_systems":["aarch64-darwin"],"path":["checks","aarch64-darwin","pre-commit"],"short_description":"","store_paths":{"out":"/nix/store/6111v5plnpi3p4zk7gg3bdm5m8shcl8p-pre-commit-run"},"what":"CI test"},{"doc":null,"for_systems":["aarch64-darwin"],"path":["checks","aarch64-darwin","purr-tests"],"short_description":"","store_paths":{"out":"/nix/store/29wz64hn7ziqmq781ajw1k7bazs53z7i-purr-tests"},"what":"CI test"}],"platform":"aarch64-darwin"},{"outputs":[{"doc":null,"for_systems":["aarch64-linux"],"path":["checks","aarch64-linux","pre-commit"],"short_description":"","store_paths":{"out":"/nix/store/4xkg5f3if9yrgwwyswxxagazjbdkp47c-pre-commit-run"},"what":"CI test"},{"doc":null,"for_systems":["aarch64-linux"],"path":["checks","aarch64-linux","purr-tests"],"short_description":"","store_paths":{"out":"/nix/store/qi1rsyacjdfwxp15gzdp6ni6mli7a2n2-purr-tests"},"what":"CI test"}],"platform":"aarch64-linux"},{"outputs":[{"doc":null,"for_systems":["x86_64-linux"],"path":["checks","x86_64-linux","pre-commit"],"short_description":"","store_paths":{"out":"/nix/store/jg9adjrpy3wwjppyg9ygkb1p8zjz9n9m-pre-commit-run"},"what":"CI test"},{"doc":null,"for_systems":["x86_64-linux"],"path":["checks","x86_64-linux","purr-tests"],"short_description":"","store_paths":{"out":"/nix/store/5zvxy03v24znvchdkrzlv2799c8jxsq8-purr-tests"},"what":"CI test"}],"platform":"x86_64-linux"}]},"devShells":{"doc":"The `devShells` flake output contains derivations that provide a development environment for `nix develop`.\n","name":"devShells","outputs":[{"outputs":[{"doc":null,"for_systems":["aarch64-darwin"],"path":["devShells","aarch64-darwin","default"],"short_description":"","store_paths":{"out":"/nix/store/8hs8n8kjcc77z981y0bzy9n2ymn3g0ip-purr-dev"},"what":"development environment"}],"platform":"aarch64-darwin"},{"outputs":[{"doc":null,"for_systems":["aarch64-linux"],"path":["devShells","aarch64-linux","default"],"short_description":"","store_paths":{"out":"/nix/store/fpq7gimhcjk27a8n40flr2gjswnm0max-purr-dev"},"what":"development environment"}],"platform":"aarch64-linux"},{"outputs":[{"doc":null,"for_systems":["x86_64-linux"],"path":["devShells","x86_64-linux","default"],"short_description":"","store_paths":{"out":"/nix/store/nn65rglxav0wxpxdplrdfdjpa38zzxxh-purr-dev"},"what":"development environment"}],"platform":"x86_64-linux"}]},"templates":{"doc":"The `templates` output provides project templates.\n","name":"templates","outputs":[{"outputs":[{"doc":null,"for_systems":[null],"path":["templates","default"],"short_description":"A minimal flake using purr standalone (mkFlake).\n","store_paths":{},"what":"template"},{"doc":null,"for_systems":[null],"path":["templates","flake-parts"],"short_description":"A minimal flake using purr with flake-parts.\n","store_paths":{},"what":"template"}],"platform":null}]}},"pretty_download_url":"https://flakehub.com/f/nixcafe/purr/0.1.106.tar.gz","project":"purr","readme":"<h1 align=\"center\">purr</h1>\n<p align=\"center\">\n  A lean Nix flake framework — <strong>auto-discovery, namespaces, and module composition</strong>.\n  <br>\n  <a href=\"https://purr.nixcafe.org\" rel=\"nofollow noopener noreferrer\"><strong>purr.nixcafe.org</strong></a>\n</p>\n<p align=\"center\">\n  <a href=\"https://flakehub.com/flake/nixcafe/purr\" rel=\"nofollow noopener noreferrer\"><img src=\"https://img.shields.io/badge/FlakeHub-nixcafe%2Fpurr-blue?logo=nixos\" alt=\"FlakeHub\"></a>\n  <a href=\"https://github.com/nixcafe/purr/blob/main/LICENSE\" rel=\"nofollow noopener noreferrer\"><img src=\"https://img.shields.io/badge/license-CC0--1.0-brightgreen\" alt=\"License\"></a>\n</p>\n<hr>\n<h2 id=\"readme-what-is-purr\"><a href=\"#readme-what-is-purr\" rel=\"nofollow noopener noreferrer\">What is purr?</a></h2>\n<p>purr turns your project directory structure into a fully wired Nix flake — <strong>no boilerplate, no manual wiring</strong>. Drop files into conventional directories and purr discovers everything: modules, packages, shells, checks, apps, overlays, templates, NixOS/darwin systems, home-manager homes, and a shared lib.</p>\n<p>Compared to other flake auto-discovery tools, purr stays <strong>minimal</strong> — a single dependency (<code>nixpkgs-lib</code>, ~2 MB) and a small, focused API surface.</p>\n<pre><code><span class=\"source\"><span class=\"comment\"># flake.nix — that's it. No manual wiring needed.</span>\n<span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">inputs</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition\">{</span>\n    <span class=\"entity other attribute-name\">nixpkgs</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>github:NixOS/nixpkgs/nixos-unstable<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n    <span class=\"entity other attribute-name\">purr</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>https://flakehub.com/f/nixcafe/purr/0.1.*.tar.gz<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n  <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n\n  <span class=\"entity other attribute-name\">outputs</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter function\">inputs</span><span class=\"punctuation definition function\">:</span>\n    <span class=\"variable parameter name\">inputs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">purr</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">lib</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">mkFlake</span> <span class=\"punctuation definition\">{</span>\n      <span class=\"keyword other\">inherit</span> <span class=\"entity other attribute-name\">inputs</span><span class=\"punctuation\">;</span>\n      <span class=\"entity other attribute-name\">src</span> <span class=\"keyword operator\">=</span> <span class=\"string\">./.</span><span class=\"punctuation\">;</span>\n    <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<p>Put your code in the right directories, and purr wires your entire flake:</p>\n<pre><code>.\n├── flake.nix\n├── modules/              → nixosModules, darwinModules, homeModules\n├── packages/             → packages..*\n├── legacyPackages/       → legacyPackages..*\n├── shells/               → devShells..*\n├── checks/               → checks..*\n├── apps/                 → apps..*\n├── overlays/             → overlays.*\n├── templates/            → templates.*\n├── formatters/           → formatter.\n├── hydraJobs/            → hydraJobs.* (CI jobs, opt-in)\n├── lib/                  → lib..* (shared across all modules)\n├── systems/              → nixosConfigurations, darwinConfigurations\n└── homes/                → homeConfigurations\n</code></pre>\n<h2 id=\"readme-quick-start\"><a href=\"#readme-quick-start\" rel=\"nofollow noopener noreferrer\">Quick Start</a></h2>\n<p>Scaffold a new purr project in seconds:</p>\n<pre><code><span class=\"source\"><span class=\"comment\"><span class=\"punctuation definition comment\">#</span> Standalone (mkFlake)</span>\n</span><span class=\"meta\"><span class=\"meta\"><span class=\"variable function\">nix</span></span><span class=\"source\"> flake init <span class=\"meta parameter\"><span class=\"variable parameter\"><span class=\"punctuation definition parameter\">-</span></span></span><span class=\"meta parameter\"><span class=\"variable parameter\">t</span></span> github:nixcafe/purr</span>\n\n<span class=\"comment\"><span class=\"punctuation definition comment\">#</span> With flake-parts</span>\n</span><span class=\"meta\"><span class=\"meta\"><span class=\"variable function\">nix</span></span><span class=\"meta\"> flake init <span class=\"meta parameter\"><span class=\"variable parameter\"><span class=\"punctuation definition parameter\">-</span></span></span><span class=\"meta parameter\"><span class=\"variable parameter\">t</span></span> github:nixcafe/purr#flake-parts</span>\n</span></code></pre>\n<h2 id=\"readme-usage\"><a href=\"#readme-usage\" rel=\"nofollow noopener noreferrer\">Usage</a></h2>\n<p>purr offers two integration modes — pick the one that fits your workflow.</p>\n<h3 id=\"readme-standalone-mkflake\"><a href=\"#readme-standalone-mkflake\" rel=\"nofollow noopener noreferrer\">Standalone (<code>mkFlake</code>)</a></h3>\n<pre><code><span class=\"source\"><span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">inputs</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition\">{</span>\n    <span class=\"entity other attribute-name\">nixpkgs</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>github:NixOS/nixpkgs/nixos-unstable<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n    <span class=\"entity other attribute-name\">purr</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>github:nixcafe/purr<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n  <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n\n  <span class=\"entity other attribute-name\">outputs</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter function\">inputs</span><span class=\"punctuation definition function\">:</span>\n    <span class=\"variable parameter name\">inputs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">purr</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">lib</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">mkFlake</span> <span class=\"punctuation definition\">{</span>\n      <span class=\"keyword other\">inherit</span> <span class=\"entity other attribute-name\">inputs</span><span class=\"punctuation\">;</span>\n      <span class=\"entity other attribute-name\">src</span> <span class=\"keyword operator\">=</span> <span class=\"string\">./.</span><span class=\"punctuation\">;</span>\n      <span class=\"entity other attribute-name\">namespace</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>myproject<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n      <span class=\"entity other attribute-name\">outputsBuilder</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition entity function\">{</span> <span class=\"variable parameter function\">pkgs</span><span class=\"keyword operator\">,</span> <span class=\"keyword operator\">... </span><span class=\"punctuation definition entity function\">}</span><span class=\"punctuation definition function\">:</span> <span class=\"punctuation definition\">{</span>\n        <span class=\"entity other attribute-name\">formatter</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter name\">pkgs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">nixfmt</span><span class=\"punctuation\">;</span>\n      <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n    <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h3 id=\"readme-flake-parts-module\"><a href=\"#readme-flake-parts-module\" rel=\"nofollow noopener noreferrer\">flake-parts module</a></h3>\n<pre><code><span class=\"source\"><span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">inputs</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition\">{</span>\n    <span class=\"entity other attribute-name\">nixpkgs</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>github:NixOS/nixpkgs/nixos-unstable<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n    <span class=\"entity other attribute-name\">flake-parts</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>github:hercules-ci/flake-parts<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n    <span class=\"entity other attribute-name\">purr</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>github:nixcafe/purr<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n  <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n\n  <span class=\"entity other attribute-name\">outputs</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter function\">inputs</span><span class=\"punctuation definition function\">:</span>\n    <span class=\"variable parameter name\">inputs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">flake-parts</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">lib</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">mkFlake</span> <span class=\"punctuation definition\">{</span> <span class=\"keyword other\">inherit</span> <span class=\"entity other attribute-name\">inputs</span><span class=\"punctuation\">;</span> <span class=\"punctuation definition\">}</span> <span class=\"punctuation definition\">{</span>\n      <span class=\"entity other attribute-name\">imports</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition list\">[</span> <span class=\"variable parameter name\">inputs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">purr</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">flakeModules</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">default</span> <span class=\"punctuation definition list\">]</span><span class=\"punctuation\">;</span>\n      <span class=\"entity other attribute-name\">purr</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition\">{</span>\n        <span class=\"entity other attribute-name\">enable</span> <span class=\"keyword operator\">=</span> <span class=\"constant\">true</span><span class=\"punctuation\">;</span>\n        <span class=\"entity other attribute-name\">src</span> <span class=\"keyword operator\">=</span> <span class=\"string\">./.</span><span class=\"punctuation\">;</span>\n        <span class=\"entity other attribute-name\">namespace</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>myproject<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n      <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n    <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h2 id=\"readme-core-concepts\"><a href=\"#readme-core-concepts\" rel=\"nofollow noopener noreferrer\">Core Concepts</a></h2>\n<h3 id=\"readme-automatic-module-discovery\"><a href=\"#readme-automatic-module-discovery\" rel=\"nofollow noopener noreferrer\">Automatic Module Discovery</a></h3>\n<p>Drop modules into <code>modules/</code> — purr discovers them by subdirectory convention:</p>\n<pre><code>modules/\n├── nixos/services/openssh/default.nix  → nixosModules.services.openssh\n├── darwin/system/defaults/default.nix  → darwinModules.system.defaults\n├── home/programs/git/default.nix       → homeModules.programs.git\n└── shared/users/default.nix            → merged into nixos + darwin\n</code></pre>\n<p>Customize the mapping with <code>moduleTypes</code>:</p>\n<pre><code><span class=\"source\"><span class=\"variable parameter name\">moduleTypes</span> <span class=\"invalid illegal\">=</span> <span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">nixos</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition list\">[</span><span class=\"string\"><span class=\"punctuation definition string\">\"</span>nixos<span class=\"punctuation definition string\">\"</span></span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>shared<span class=\"punctuation definition string\">\"</span></span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>container<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation definition list\">]</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span><span class=\"invalid illegal\">;</span>\n</span></code></pre>\n<h3 id=\"readme-namespace-support\"><a href=\"#readme-namespace-support\" rel=\"nofollow noopener noreferrer\">Namespace Support</a></h3>\n<p>purr injects a <code>namespace</code> parameter into every module, scoping options under <code>config.&lt;namespace&gt;.*</code> — no more global option collisions:</p>\n<pre><code><span class=\"source\"><span class=\"punctuation definition entity function\">{</span> <span class=\"variable parameter function\">config</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">lib</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">namespace</span><span class=\"keyword operator\">,</span> <span class=\"keyword operator\">... </span><span class=\"punctuation definition entity function\">}</span><span class=\"punctuation definition function\">:</span>\n<span class=\"keyword other\">let</span>\n  <span class=\"entity other attribute-name\">cfg</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter name\">config</span><span class=\"keyword operator\">.</span><span class=\"markup italic\"><span class=\"punctuation section embedded\">${</span><span class=\"variable parameter name\">namespace</span><span class=\"punctuation section embedded\">}</span></span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">my-module</span><span class=\"punctuation\">;</span>\n<span class=\"keyword other\">in</span>\n<span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">options</span>.<span class=\"markup italic\"><span class=\"punctuation section embedded\">${</span><span class=\"variable parameter name\">namespace</span><span class=\"punctuation section embedded\">}</span></span>.<span class=\"entity other attribute-name\">my-module</span>.<span class=\"entity other attribute-name\">enable</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter name\">lib</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">mkEnableOption</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>my module<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n  <span class=\"entity other attribute-name\">config</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter name\">lib</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">mkIf</span> <span class=\"variable parameter name\">cfg</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">enable</span> <span class=\"punctuation definition\">{</span> <span class=\"comment\">/* ... */</span> <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h3 id=\"readme-custom-lib-lib-namespace\"><a href=\"#readme-custom-lib-lib-namespace\" rel=\"nofollow noopener noreferrer\">Custom Lib (<code>lib.&lt;namespace&gt;.*</code>)</a></h3>\n<p>Create a <code>lib/</code> directory to share functions across all modules, packages, shells, and checks:</p>\n<pre><code><span class=\"source\"><span class=\"comment\"># lib/default.nix</span>\n<span class=\"punctuation definition entity function\">{</span> <span class=\"variable parameter function\">lib</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">inputs</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">namespace</span> <span class=\"punctuation definition entity function\">}</span><span class=\"punctuation definition function\">:</span>\n<span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">keys</span> <span class=\"keyword operator\">=</span> <span class=\"support function\">import</span> <span class=\"string\">./keys.nix</span> <span class=\"punctuation definition\">{</span> <span class=\"keyword other\">inherit</span> <span class=\"entity other attribute-name\">lib</span> <span class=\"entity other attribute-name\">inputs</span> <span class=\"entity other attribute-name\">namespace</span><span class=\"punctuation\">;</span> <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n  <span class=\"entity other attribute-name\">utils</span> <span class=\"keyword operator\">=</span> <span class=\"support function\">import</span> <span class=\"string\">./utils.nix</span> <span class=\"punctuation definition\">{</span> <span class=\"keyword other\">inherit</span> <span class=\"entity other attribute-name\">lib</span> <span class=\"entity other attribute-name\">inputs</span> <span class=\"entity other attribute-name\">namespace</span><span class=\"punctuation\">;</span> <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<p>Access anywhere with <code>lib.&lt;namespace&gt;.keys</code>, <code>lib.&lt;namespace&gt;.utils</code>, etc.</p>\n<h3 id=\"readme-systems-homes\"><a href=\"#readme-systems-homes\" rel=\"nofollow noopener noreferrer\">Systems &amp; Homes</a></h3>\n<p>purr auto-discovers NixOS/darwin systems and home-manager homes using <code>&lt;arch&gt;-&lt;format&gt;/&lt;name&gt;</code>:</p>\n<pre><code>systems/\n├── x86_64-linux/server/default.nix    → nixosConfigurations.server\n└── aarch64-darwin/macbook/default.nix → darwinConfigurations.macbook\n\nhomes/\n└── x86_64-linux/alice@server/default.nix  → homeConfigurations.\"alice@server\"\n</code></pre>\n<p>Each host can carry <strong>host meta</strong> — a <code>meta.nix</code> next to its <code>default.nix</code>, or <code>hosts.&lt;name&gt;.meta</code> in the flake config. Declaring <code>images</code> in the meta makes the host an <strong>image-only recipe</strong> (e.g. installer ISOs): it is excluded from <code>nixosConfigurations</code>/<code>darwinConfigurations</code> unless you also set <code>deployable = true</code>. Its images are exposed as a top-level <code>images.&lt;host&gt;.&lt;format&gt;</code> output:</p>\n<pre><code><span class=\"source\"><span class=\"comment\"># systems/x86_64-linux/installer/meta.nix</span>\n<span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">images</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition list\">[</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>iso<span class=\"punctuation definition string\">\"</span></span> <span class=\"punctuation definition list\">]</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<p>The merged meta (auto-generated keys + your custom keys) is injected into the host's modules as <code>purr.meta</code>.</p>\n<p>Homes named <code>&lt;user&gt;@&lt;host&gt;</code> auto-link to matching hosts. No extra wiring needed.</p>\n<pre><code><span class=\"source\"><span class=\"comment\"># systems/x86_64-linux/server/default.nix</span>\n<span class=\"punctuation definition entity function\">{</span> <span class=\"variable parameter function\">config</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">pkgs</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">lib</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">purr</span><span class=\"keyword operator\">,</span> <span class=\"keyword operator\">... </span><span class=\"punctuation definition entity function\">}</span><span class=\"punctuation definition function\">:</span>\n<span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">networking</span>.<span class=\"entity other attribute-name\">hostName</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter name\">purr</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">meta</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">name</span><span class=\"punctuation\">;</span>  <span class=\"comment\"># \"server\"</span>\n  <span class=\"comment\"># ...auto-injects home-manager config for alice@server automatically</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h3 id=\"readme-namespace-bridge\"><a href=\"#readme-namespace-bridge\" rel=\"nofollow noopener noreferrer\">Namespace Bridge</a></h3>\n<p>Forward home-manager config from any NixOS module via the namespace bridge — set <code>purr.users.&lt;name&gt;.homeConfig</code> on a host with linked homes:</p>\n<pre><code><span class=\"source\"><span class=\"punctuation definition entity function\">{</span> <span class=\"variable parameter function\">config</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">pkgs</span><span class=\"keyword operator\">,</span> <span class=\"variable parameter function\">lib</span><span class=\"keyword operator\">,</span> <span class=\"keyword operator\">... </span><span class=\"punctuation definition entity function\">}</span><span class=\"punctuation definition function\">:</span>\n<span class=\"punctuation definition\">{</span>\n  <span class=\"entity other attribute-name\">purr</span>.<span class=\"entity other attribute-name\">users</span>.<span class=\"entity other attribute-name\">alice</span>.<span class=\"entity other attribute-name\">homeConfig</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition\">{</span>\n    <span class=\"entity other attribute-name\">home</span>.<span class=\"entity other attribute-name\">packages</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition list\">[</span> <span class=\"variable parameter name\">pkgs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">cowsay</span> <span class=\"punctuation definition list\">]</span><span class=\"punctuation\">;</span>\n    <span class=\"entity other attribute-name\">programs</span>.<span class=\"entity other attribute-name\">git</span>.<span class=\"entity other attribute-name\">userName</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>Alice<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n  <span class=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h2 id=\"readme-why-purr\"><a href=\"#readme-why-purr\" rel=\"nofollow noopener noreferrer\">Why purr?</a></h2>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>purr</th>\n<th>Other frameworks</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Dependencies</strong></td>\n<td>1 (<code>nixpkgs-lib</code>, ~2 MB)</td>\n<td>3+ (flake-parts, flake-utils, ...)</td>\n</tr>\n<tr>\n<td><strong>API surface</strong></td>\n<td>Single <code>mkFlake</code> call or one flake-parts module</td>\n<td>Multiple nested imports</td>\n</tr>\n<tr>\n<td><strong>Option namespace</strong></td>\n<td>Built-in <code>namespace</code> injection</td>\n<td>Manual <code>config.&lt;name&gt;.</code> prefixing</td>\n</tr>\n<tr>\n<td><strong>Systems &amp; homes</strong></td>\n<td>Auto-discovered, auto-linked</td>\n<td>Manual wiring</td>\n</tr>\n<tr>\n<td><strong>Custom lib</strong></td>\n<td><code>lib.&lt;namespace&gt;.*</code> propagated everywhere</td>\n<td>Manual import passthrough</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"readme-testing\"><a href=\"#readme-testing\" rel=\"nofollow noopener noreferrer\">Testing</a></h2>\n<p>Tests live under <code>tests/</code> and are auto-discovered — drop a\n<code>test-*.nix</code> into <code>tests/unit/</code> (1:1 with a <code>lib/</code> module) or\n<code>tests/integration/</code> (real-project runs against <code>tests/integration/project</code>)\nand it is picked up automatically.</p>\n<pre><code><span class=\"meta\"><span class=\"meta\"><span class=\"variable function\">nix</span></span><span class=\"source\"> flake check</span>                       <span class=\"comment\"><span class=\"punctuation definition comment\">#</span> CI gate: pre-commit + purr-tests</span>\n</span><span class=\"meta\"><span class=\"meta\"><span class=\"variable function\">nix</span></span><span class=\"meta\"> build .#checks.x86_64-linux.purr-tests</span> <span class=\"keyword operator\">&amp;&amp;</span> </span><span class=\"meta\"><span class=\"meta\"><span class=\"variable function\">cat</span></span><span class=\"meta\"> result</span>   <span class=\"comment\"><span class=\"punctuation definition comment\">#</span> full per-test report</span>\n</span><span class=\"meta\"><span class=\"meta\"><span class=\"variable function\">tests/run-tests.sh</span></span>                    <span class=\"comment\"><span class=\"punctuation definition comment\">#</span> run directly, live per-test output</span>\n</span><span class=\"meta\"><span class=\"meta\"><span class=\"variable function\">nix</span></span><span class=\"meta\"> develop <span class=\"meta parameter\"><span class=\"variable parameter\"><span class=\"punctuation definition parameter\">--</span></span></span><span class=\"meta parameter\"><span class=\"variable parameter\">command</span></span> purr-test</span>       <span class=\"comment\"><span class=\"punctuation definition comment\">#</span> same, from the dev shell</span>\n</span></code></pre>\n<p>The <code>purr-tests</code> check writes the full report into its <code>result</code>; if a test\nfails the build fails and <code>nix log</code> shows the failing cases. Unit tests run\nhermetically with <code>nixpkgs-lib</code>; integration tests mock <code>nixosSystem</code> /\n<code>homeManagerConfiguration</code> to evaluate the generated configs through the real\n<code>lib.evalModules</code> without pulling a full nixpkgs.</p>\n<h2 id=\"readme-documentation\"><a href=\"#readme-documentation\" rel=\"nofollow noopener noreferrer\">Documentation</a></h2>\n<p>Full documentation at <strong><a href=\"https://purr.nixcafe.org\" rel=\"nofollow noopener noreferrer\">purr.nixcafe.org</a></strong> — flake-parts integration, full API reference, directory layout guide, and more.</p>\n<h2 id=\"readme-license\"><a href=\"#readme-license\" rel=\"nofollow noopener noreferrer\">License</a></h2>\n<p><a href=\"https://github.com/nixcafe/purr/blob/HEAD/LICENSE\" rel=\"nofollow noopener noreferrer\">CC0 1.0 Universal</a></p>\n","repo_url":"https://github.com/nixcafe/purr","revision":"4f5ea66ed5b00f4471bbc9a63f7903dcc563d218","simplified_version":"0.1.106","source_github_owner_repo_pair":"nixcafe/purr","source_subdirectory":null,"spdx_identifier":"CC0-1.0","version":"0.1.106+rev-4f5ea66ed5b00f4471bbc9a63f7903dcc563d218","visibility":"public"}