{"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.73+rev-2e7e4d20a3e010180481ed79ea79a6510a41eaf5.tar.gz","labels":["nix-flake","flake-framework","flake-parts","auto-discovery","module-system","nix"],"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/ns4av9qrkhwipvpci7kzpfg69pdpziz2-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/dvb9mzarx2wh2dbarcry0ivzrklhirb6-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/fwrj3c9vrr4mv3sg9hq0fjbic8ipkzs0-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/35ihkm9niq80hbgb334mymf03g9qazk4-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/l5qv0cwx43mzqm7qv79l81s3z51mf927-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/ps4gg59hifv16368kfq912gh0b23c73i-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/2ywacj2bdm4fimi4dynb9pi19xxar4rc-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/y04m0gndvnpya73jv6sk4i8h77nz25lk-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/cl5sknsp01rxjsl9z4jls1dmvj4s1zan-purr-dev"},"what":"development environment"}],"platform":"x86_64-linux"}]}},"pretty_download_url":"https://flakehub.com/f/nixcafe/purr/0.1.73.tar.gz","project":"purr","readme":"<h1 id=\"readme-purr\"><a href=\"#readme-purr\" rel=\"nofollow noopener noreferrer\">Purr</a></h1>\n<p>Purr — a lean Nix flake library for module auto-discovery and namespace\nsupport. Compared to other flake module auto-discovery tools, Purr stays\nminimal with a single dependency and a smaller default surface area.</p>\n<h2 id=\"readme-why-purr\"><a href=\"#readme-why-purr\" rel=\"nofollow noopener noreferrer\">Why Purr?</a></h2>\n<ul>\n<li><strong>Minimal footprint</strong> — single dependency (<code>nixpkgs-lib</code>, ~2MB)</li>\n<li><strong>Auto-discovery</strong> — recursively scans directories for modules, packages, shells, checks, apps, overlays, templates, and lib</li>\n<li><strong>Namespace support</strong> — injects <code>namespace</code> into every module, keeping options under <code>config.&lt;namespace&gt;.*</code></li>\n<li><strong>Lib propagation</strong> — project custom lib (<code>lib.&lt;namespace&gt;.*</code>) available to all auto-discovered modules</li>\n<li><strong>Dual integration</strong> — works standalone via <code>mkFlake</code> or as a flake-parts module</li>\n</ul>\n<h2 id=\"readme-usage\"><a href=\"#readme-usage\" rel=\"nofollow noopener noreferrer\">Usage</a></h2>\n<h3 id=\"readme-standalone-mkflake\"><a href=\"#readme-standalone-mkflake\" rel=\"nofollow noopener noreferrer\">Standalone (mkFlake)</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\"><a href=\"#readme-flake-parts\" rel=\"nofollow noopener noreferrer\">flake-parts</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=\"entity other attribute-name\">my-extra-modules</span>.<span class=\"entity other attribute-name\">url</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>github:user/my-extra-modules<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\">systems</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition list\">[</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>x86_64-linux<span class=\"punctuation definition string\">\"</span></span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>aarch64-linux<span class=\"punctuation definition string\">\"</span></span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>aarch64-darwin<span class=\"punctuation definition string\">\"</span></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>cattery<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n        <span class=\"entity other attribute-name\">extraModules</span>.<span class=\"entity other attribute-name\">nixos</span> <span class=\"keyword operator\">=</span> <span class=\"punctuation definition list\">[</span>\n          <span class=\"variable parameter name\">inputs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">my-extra-modules</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">nixosModules</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">default</span>\n        <span class=\"punctuation definition list\">]</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-directory-structure\"><a href=\"#readme-directory-structure\" rel=\"nofollow noopener noreferrer\">Directory Structure</a></h2>\n<p>All directories are auto-detected under <code>src</code>:</p>\n<pre><code>src/\n├── lib/                              # Project library (auto-detect: \"lib\")\n│   ├── default.nix                   #   import { lib, inputs, namespace }: returns attrset\n│   ├── keys/\n│   │   └── default.nix               #   nested → lib..keys\n│   └── utils/\n│       └── default.nix               #   nested → lib..utils\n│                                     #   flattenLib = true → lib.\n│\n├── modules/                          # NixOS/darwin/home modules\n│   ├── nixos/                        #   → nixosModules\n│   ├── darwin/                       #   → darwinModules\n│   ├── home/                         #   → homeModules\n│   └── shared/                       #   → merged into nixos + darwin\n│\n├── packages/                         # Per-system packages (auto-detect: \"packages\")\n│   ├── known-hosts/\n│   │   └── default.nix               #   → packages..known-hosts\n│   └── match-blocks/\n│       └── default.nix               #   → packages..match-blocks\n│\n├── shells/                           # Dev shells (auto-detect: \"shells\", \"devShells\")\n│   └── default/\n│       └── default.nix               #   → devShells..default\n│\n├── checks/                           # Per-system checks (auto-detect: \"checks\")\n│   └── pre-commit/\n│       └── default.nix               #   → checks..pre-commit\n│\n├── overlays/                         # Overlays (auto-detect: \"overlays\")\n│   └── custom/\n│       └── default.nix               #   → overlays.custom\n│\n├── templates/                        # Flake templates (auto-detect: \"templates\")\n│   └── rust/                         #   non-recursive by default\n│       └── default.nix               #   → templates.rust\n│\n└── apps/                             # Per-system apps (auto-detect: \"apps\")\n    └── serve/\n        └── default.nix               #   → apps..serve\n</code></pre>\n<h3 id=\"readme-module-arguments\"><a href=\"#readme-module-arguments\" rel=\"nofollow noopener noreferrer\">Module arguments</a></h3>\n<p>Each auto-discovered module receives different arguments:</p>\n<p>| Directory | Arguments |\n|---|---|---|\n| <code>lib/</code> | <code>{ lib, inputs, namespace }</code> |\n| <code>modules/</code> | <code>{ config, options, lib, pkgs, namespace, ... }</code> |\n| <code>packages/</code> | <code>{ inputs, system, namespace, lib, pkgs }</code> |\n| <code>shells/</code> | <code>{ inputs, system, namespace, lib, pkgs }</code> |\n| <code>checks/</code> | <code>{ inputs, system, namespace, lib, pkgs }</code> |\n| <code>apps/</code> | <code>{ inputs, system, namespace, lib, pkgs }</code> |\n| <code>overlays/</code> | <code>final: prev:</code> (Nix overlay convention) |\n| <code>templates/</code> | <code>{ inputs, namespace, lib }</code> |\n| <code>systems/</code> | <code>{ config, options, lib, pkgs, purr, ... }</code> |\n| <code>homes/</code> | <code>{ config, options, lib, pkgs, purr, ... }</code> |</p>\n<blockquote>\n<p><strong>Note:</strong> <code>lib</code> in <code>packages/</code>, <code>shells/</code>, <code>checks/</code>, and <code>apps/</code> includes the\nproject's custom lib under <code>lib.&lt;namespace&gt;.*</code>, merged via <code>purrLib</code>.\n<code>systems/</code> and <code>homes/</code> receive a <code>purr</code> attrset with metadata about the\ncurrent configuration context via <code>specialArgs</code> / <code>extraSpecialArgs</code>.</p>\n</blockquote>\n<h2 id=\"readme-module-discovery\"><a href=\"#readme-module-discovery\" rel=\"nofollow noopener noreferrer\">Module Discovery</a></h2>\n<p>Place modules under <code>modules/</code> and they're auto-discovered:</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            → nixos + darwin (shared)\n</code></pre>\n<p>Each module receives <code>namespace</code> as a parameter:</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=\"variable parameter function\">args</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=\"punctuation definition\">}</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h2 id=\"readme-custom-lib\"><a href=\"#readme-custom-lib\" rel=\"nofollow noopener noreferrer\">Custom Lib</a></h2>\n<p>Create a <code>lib/</code> directory under <code>src</code> to share functions across all modules:</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>Functions are accessible as <code>lib.&lt;namespace&gt;.*</code> in all modules, packages,\nshells, and checks. Subdirectories nest by default\n(<code>lib.&lt;namespace&gt;.keys.foo</code>). Set <code>flattenLib = true</code> to merge all\nsubmodules directly under the namespace (<code>lib.&lt;namespace&gt;.foo</code>).</p>\n<pre><code><span class=\"source\"><span class=\"comment\"># packages/known-hosts/default.nix</span>\n<span class=\"punctuation definition entity function\">{</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\">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=\"keyword other\">inherit</span> <span class=\"punctuation section function\">(</span><span class=\"variable parameter name\">lib</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=\"punctuation section function\">)</span> <span class=\"entity other attribute-name\">keys</span><span class=\"punctuation\">;</span>\n<span class=\"keyword other\">in</span>\n<span class=\"variable parameter name\">pkgs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">writeText</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>known-hosts<span class=\"punctuation definition string\">\"</span></span> <span class=\"punctuation definition\">(</span><span class=\"variable parameter name\">keys</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">generate</span> <span class=\"punctuation definition\">{</span> <span class=\"keyword operator\">... </span><span class=\"punctuation definition entity function\">}</span><span class=\"invalid illegal\">)</span>\n</span></code></pre>\n<p>The <code>lib/</code> directory supports both a root <code>default.nix</code> and recursive\nsubdirectory discovery via <code>findModules</code> — both can coexist.</p>\n<h3 id=\"readme-custom-module-directories\"><a href=\"#readme-custom-module-directories\" rel=\"nofollow noopener noreferrer\">Custom module directories</a></h3>\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=\"string\"><span class=\"punctuation definition string\">\"</span>nixos-musl<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-extra-modules-from-other-flakes\"><a href=\"#readme-extra-modules-from-other-flakes\" rel=\"nofollow noopener noreferrer\">Extra modules from other flakes</a></h3>\n<pre><code><span class=\"source\"><span class=\"variable parameter name\">extraModules</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>\n    <span class=\"variable parameter name\">inputs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">cattery-modules</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">nixosModules</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">default</span>\n    <span class=\"variable parameter name\">inputs</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">disko</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">nixosModules</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">default</span>\n  <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-default-module-bundle\"><a href=\"#readme-default-module-bundle\" rel=\"nofollow noopener noreferrer\">Default module bundle</a></h3>\n<p>By default, sub-modules are exported individually. Enable <code>bundleModules = true</code>\nto auto-generate a <code>default</code> module that imports all sub-modules:</p>\n<pre><code><span class=\"source\"><span class=\"punctuation definition\">{</span> <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\">myflake</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">nixosModules</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">default</span> <span class=\"punctuation definition list\">]</span><span class=\"punctuation\">;</span> <span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<p>Set <code>bundleExtraModules = false</code> to exclude extraModules from the default\nbundle (only auto-discovered modules will be included). If you define your own\n<code>default</code> module under <code>modules/</code>, the auto-generated bundle is skipped.</p>\n<h2 id=\"readme-systems-homes\"><a href=\"#readme-systems-homes\" rel=\"nofollow noopener noreferrer\">Systems &amp; Homes</a></h2>\n<p>Purr auto-discovers NixOS/darwin systems, home-manager homes, and image formats\nusing the <code>&lt;arch&gt;-&lt;format&gt;/&lt;name&gt;</code> convention (compatible with\n<a href=\"https://snowfall.org\" rel=\"nofollow noopener noreferrer\">Snowfall Lib</a>).</p>\n<h3 id=\"readme-directory-structure\"><a href=\"#readme-directory-structure\" rel=\"nofollow noopener noreferrer\">Directory structure</a></h3>\n<pre><code>src/\n├── systems/                          # auto-detect: \"systems\", \"hosts\"\n│   ├── x86_64-linux/\n│   │   ├── server/default.nix        # → nixosConfigurations.server\n│   │   └── laptop/default.nix        # → nixosConfigurations.laptop\n│   ├── x86_64-iso/\n│   │   └── server/default.nix        # → isoConfigurations.server\n│   ├── x86_64-do/\n│   │   └── server/default.nix        # → doConfigurations.server\n│   └── aarch64-darwin/\n│       └── macbook/default.nix       # → darwinConfigurations.macbook\n│\n├── homes/                            # auto-detect: \"homes\"\n│   ├── x86_64-linux/\n│   │   ├── alice@server/default.nix  # → homeConfigurations.\"alice@server\"\n│   │   └── bob@server/default.nix    # → homeConfigurations.\"bob@server\"\n│   └── aarch64-darwin/\n│       └── alice@macbook/default.nix # → homeConfigurations.\"alice@macbook\"\n│\n├── modules/\n├── lib/\n└── ...\n</code></pre>\n<h3 id=\"readme-system-output-mapping\"><a href=\"#readme-system-output-mapping\" rel=\"nofollow noopener noreferrer\">System output mapping</a></h3>\n<table>\n<thead>\n<tr>\n<th>Format in dir name</th>\n<th>Flake output key</th>\n<th>Builder</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>linux</code></td>\n<td><code>nixosConfigurations.&lt;name&gt;</code></td>\n<td><code>nixosSystem</code></td>\n</tr>\n<tr>\n<td><code>darwin</code></td>\n<td><code>darwinConfigurations.&lt;name&gt;</code></td>\n<td><code>darwinSystem</code></td>\n</tr>\n<tr>\n<td><code>iso</code>, <code>do</code>, …</td>\n<td><code>&lt;format&gt;Configurations.&lt;name&gt;</code></td>\n<td><code>nixosSystem</code> + <code>image.variant</code></td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"readme-home-auto-linking\"><a href=\"#readme-home-auto-linking\" rel=\"nofollow noopener noreferrer\">Home auto-linking</a></h3>\n<p>Homes named <code>&lt;user&gt;@&lt;host&gt;</code> are automatically injected into matching hosts.\nWhen <code>home-manager</code> (or <code>homeManager</code>) is available as an input, building <code>nixosConfigurations.server</code>\nwill include all homes with <code>@server</code> suffix:</p>\n<pre><code><span class=\"source\"><span class=\"comment\"># homes/x86_64-linux/alice@server/default.nix</span>\n<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\">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\">neovim</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\">enable</span> <span class=\"keyword operator\">=</span> <span class=\"constant\">true</span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<p>The home is auto-configured via <code>home-manager.users.alice</code> in the host's NixOS\nconfig. No additional wiring needed.</p>\n<h3 id=\"readme-image-formats-nixos-generators-replacement\"><a href=\"#readme-image-formats-nixos-generators-replacement\" rel=\"nofollow noopener noreferrer\">Image formats (nixos-generators replacement)</a></h3>\n<p>nixos-generators was merged into nixpkgs (25.05+). Set <code>image.variant</code> in the\nsystem config to build images. Purr auto-detects format directories and adds\nthe variant:</p>\n<pre><code><span class=\"source\"><span class=\"comment\"># systems/x86_64-iso/server/default.nix</span>\n<span class=\"punctuation definition entity function\">{</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\">image</span>.<span class=\"entity other attribute-name\">variant</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>iso<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>  <span class=\"comment\"># implied, auto-set by Purr</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h3 id=\"readme-purr-metadata\"><a href=\"#readme-purr-metadata\" rel=\"nofollow noopener noreferrer\"><code>purr</code> Metadata</a></h3>\n<p>Each system and home module receives a <code>purr</code> attrset with metadata about the\ncurrent configuration. This is passed via <code>specialArgs</code> (systems) and\n<code>extraSpecialArgs</code> (homes).</p>\n<p><strong>System modules</strong> (<code>specialArgs.purr</code>):</p>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Example</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td><code>\"server\"</code></td>\n<td>System/host name</td>\n</tr>\n<tr>\n<td><code>arch</code></td>\n<td><code>\"x86_64\"</code></td>\n<td>Architecture</td>\n</tr>\n<tr>\n<td><code>format</code></td>\n<td><code>\"linux\"</code></td>\n<td>linux, darwin, iso, ...</td>\n</tr>\n<tr>\n<td><code>archFormat</code></td>\n<td><code>\"x86_64-linux\"</code></td>\n<td>Full arch-format string</td>\n</tr>\n<tr>\n<td><code>homes</code></td>\n<td><code>[{user=\"alice\";host=\"server\";}]</code></td>\n<td>Linked home configs</td>\n</tr>\n</tbody>\n</table>\n<p><strong>Home modules</strong> (<code>extraSpecialArgs.purr</code>):</p>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Example</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>user</code></td>\n<td><code>\"alice\"</code></td>\n<td>Username</td>\n</tr>\n<tr>\n<td><code>host</code></td>\n<td><code>\"server\"</code></td>\n<td>Host name</td>\n</tr>\n<tr>\n<td><code>arch</code></td>\n<td><code>\"x86_64\"</code></td>\n<td>Architecture</td>\n</tr>\n<tr>\n<td><code>format</code></td>\n<td><code>\"linux\"</code></td>\n<td>linux, darwin, ...</td>\n</tr>\n<tr>\n<td><code>archFormat</code></td>\n<td><code>\"x86_64-linux\"</code></td>\n<td>Full arch-format string</td>\n</tr>\n</tbody>\n</table>\n<p>Example:</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\">name</span><span class=\"punctuation\">;</span>  <span class=\"comment\"># \"server\"</span>\n  <span class=\"entity other attribute-name\">nixpkgs</span>.<span class=\"entity other attribute-name\">hostPlatform</span> <span class=\"keyword operator\">=</span> <span class=\"variable parameter name\">purr</span><span class=\"keyword operator\">.</span><span class=\"variable parameter name\">arch</span><span class=\"punctuation\">;</span> <span class=\"comment\"># \"x86_64\"</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h3 id=\"readme-auto-injection\"><a href=\"#readme-auto-injection\" rel=\"nofollow noopener noreferrer\">Auto-injection</a></h3>\n<p>By default (<code>autoInject = true</code>), Purr auto-injects basic configuration using\n<code>lib.mkDefault</code> — user modules can always override:</p>\n<table>\n<thead>\n<tr>\n<th>Context</th>\n<th>Injected config</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>System config</td>\n<td><code>networking.hostName = &lt;purr.name&gt;</code></td>\n</tr>\n<tr>\n<td>Home config (linux)</td>\n<td><code>home.username</code>, <code>home.homeDirectory = \"/home/&lt;user&gt;\"</code></td>\n</tr>\n<tr>\n<td>Home config (darwin)</td>\n<td><code>home.username</code>, <code>home.homeDirectory = \"/Users/&lt;user&gt;\"</code></td>\n</tr>\n</tbody>\n</table>\n<p>Disable with <code>autoInject = false</code>.</p>\n<h3 id=\"readme-example-usage\"><a href=\"#readme-example-usage\" rel=\"nofollow noopener noreferrer\">Example usage</a></h3>\n<p><strong>mkFlake:</strong></p>\n<pre><code><span class=\"source\"><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\">systemsDir</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>systems<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>   <span class=\"comment\"># or \"hosts\", or null to auto-detect</span>\n  <span class=\"entity other attribute-name\">homesDir</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>homes<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<p><strong>flake-parts:</strong></p>\n<pre><code><span class=\"source\"><span class=\"variable parameter name\">purr</span> <span class=\"invalid illegal\">=</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\">systemsDir</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>systems<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n  <span class=\"entity other attribute-name\">homesDir</span> <span class=\"keyword operator\">=</span> <span class=\"string\"><span class=\"punctuation definition string\">\"</span>homes<span class=\"punctuation definition string\">\"</span></span><span class=\"punctuation\">;</span>\n<span class=\"punctuation definition\">}</span>\n</span></code></pre>\n<h2 id=\"readme-api\"><a href=\"#readme-api\" rel=\"nofollow noopener noreferrer\">API</a></h2>\n<h3 id=\"readme-mkflake\"><a href=\"#readme-mkflake\" rel=\"nofollow noopener noreferrer\"><code>mkFlake</code></a></h3>\n<table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Default</th>\n<th></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>inputs</code></td>\n<td>attrs</td>\n<td><em>required</em></td>\n<td>Flake inputs. Required: <code>nixpkgs</code>. Optional: <code>home-manager</code> (or <code>homeManager</code>) for home-manager support, <code>nix-darwin</code> (or <code>darwin</code>) for darwin support</td>\n</tr>\n<tr>\n<td><code>src</code></td>\n<td>path</td>\n<td><em>required</em></td>\n<td>Project root directory</td>\n</tr>\n<tr>\n<td><code>namespace</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>Module option namespace, also used as lib key (<code>lib.&lt;namespace&gt;</code>)</td>\n</tr>\n<tr>\n<td><code>libDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>Lib directory (relative to <code>src</code>), auto-detects <code>lib/</code></td>\n</tr>\n<tr>\n<td><code>flattenLib</code></td>\n<td>bool</td>\n<td><code>false</code></td>\n<td>Flatten lib subdirectories into root (no dir nesting)</td>\n</tr>\n<tr>\n<td><code>systems</code></td>\n<td>list</td>\n<td><code>[\"x86_64-linux\" \"aarch64-linux\" \"aarch64-darwin\"]</code></td>\n<td>Systems to generate for</td>\n</tr>\n<tr>\n<td><code>nixpkgsConfig</code></td>\n<td>attrs</td>\n<td><code>{}</code></td>\n<td>nixpkgs config (allowUnfree, etc.)</td>\n</tr>\n<tr>\n<td><code>outputsBuilder</code></td>\n<td>fn</td>\n<td><code>({ pkgs, system, inputs, namespace, lib }: {})</code></td>\n<td>Per-system extra flake outputs (formatter, packages, etc.)</td>\n</tr>\n<tr>\n<td><code>modulesDir</code></td>\n<td>str</td>\n<td><code>\"modules\"</code></td>\n<td>Module directory name under src</td>\n</tr>\n<tr>\n<td><code>moduleTypes</code></td>\n<td>attrs</td>\n<td><code>{nixos=[\"nixos\" \"shared\"]; ...}</code></td>\n<td>Subdirectory mapping per output</td>\n</tr>\n<tr>\n<td><code>extraModules</code></td>\n<td>attrs</td>\n<td><code>{}</code></td>\n<td><code>{nixos=[...]; darwin=[...]; home=[...]}</code> — raw module injection</td>\n</tr>\n<tr>\n<td><code>bundleModules</code></td>\n<td>bool</td>\n<td><code>false</code></td>\n<td>Bundle all modules into a <code>default</code> module</td>\n</tr>\n<tr>\n<td><code>bundleExtraModules</code></td>\n<td>bool</td>\n<td><code>true</code></td>\n<td>Include extra modules in the <code>default</code> bundle</td>\n</tr>\n<tr>\n<td><code>checksDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>checks/</code></td>\n</tr>\n<tr>\n<td><code>shellsDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>shells/</code> then <code>devShells/</code></td>\n</tr>\n<tr>\n<td><code>overlaysDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>overlays/</code></td>\n</tr>\n<tr>\n<td><code>packagesDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>packages/</code></td>\n</tr>\n<tr>\n<td><code>appsDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>apps/</code></td>\n</tr>\n<tr>\n<td><code>templatesDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>templates/</code></td>\n</tr>\n<tr>\n<td><code>templatesRecursive</code></td>\n<td>bool</td>\n<td><code>false</code></td>\n<td>Whether to scan <code>templates/</code> recursively</td>\n</tr>\n<tr>\n<td><code>systemsDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>systems/</code> then <code>hosts/</code></td>\n</tr>\n<tr>\n<td><code>homesDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>homes/</code></td>\n</tr>\n<tr>\n<td><code>autoInject</code></td>\n<td>bool</td>\n<td><code>true</code></td>\n<td>Auto-inject <code>networking.hostName</code>, <code>home.username</code>, etc.</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"readme-flake-parts-options\"><a href=\"#readme-flake-parts-options\" rel=\"nofollow noopener noreferrer\">flake-parts Options</a></h3>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Type</th>\n<th>Default</th>\n<th></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>purr.enable</code></td>\n<td>bool</td>\n<td><code>false</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>purr.src</code></td>\n<td>path</td>\n<td><em>required</em></td>\n<td>Project root</td>\n</tr>\n<tr>\n<td><code>purr.namespace</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>purr.libDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>lib/</code></td>\n</tr>\n<tr>\n<td><code>purr.flattenLib</code></td>\n<td>bool</td>\n<td><code>false</code></td>\n<td>Flatten lib subdirectories into root</td>\n</tr>\n<tr>\n<td><code>purr.modulesDir</code></td>\n<td>str</td>\n<td><code>\"modules\"</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>purr.moduleTypes</code></td>\n<td>attrs</td>\n<td><code>{nixos=[\"nixos\" \"shared\"]; ...}</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>purr.checksDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>checks/</code></td>\n</tr>\n<tr>\n<td><code>purr.shellsDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>shells/</code> then <code>devShells/</code></td>\n</tr>\n<tr>\n<td><code>purr.overlaysDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>overlays/</code></td>\n</tr>\n<tr>\n<td><code>purr.packagesDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>packages/</code></td>\n</tr>\n<tr>\n<td><code>purr.appsDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>apps/</code></td>\n</tr>\n<tr>\n<td><code>purr.templatesDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>templates/</code></td>\n</tr>\n<tr>\n<td><code>purr.templatesRecursive</code></td>\n<td>bool</td>\n<td><code>false</code></td>\n<td>Whether to scan <code>templates/</code> recursively</td>\n</tr>\n<tr>\n<td><code>purr.extraModules</code></td>\n<td>attrs</td>\n<td><code>{}</code></td>\n<td><code>{nixos=[...]; darwin=[...]; home=[...]}</code></td>\n</tr>\n<tr>\n<td><code>purr.bundleModules</code></td>\n<td>bool</td>\n<td><code>false</code></td>\n<td>Bundle all modules into a <code>default</code> module</td>\n</tr>\n<tr>\n<td><code>purr.bundleExtraModules</code></td>\n<td>bool</td>\n<td><code>true</code></td>\n<td>Include extra modules in the <code>default</code> bundle</td>\n</tr>\n<tr>\n<td><code>purr.systemsDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>systems/</code> then <code>hosts/</code></td>\n</tr>\n<tr>\n<td><code>purr.homesDir</code></td>\n<td>nullOr str</td>\n<td><code>null</code></td>\n<td>auto-detects <code>homes/</code></td>\n</tr>\n<tr>\n<td><code>purr.nixpkgsConfig</code></td>\n<td>attrs</td>\n<td><code>{}</code></td>\n<td>nixpkgs config (allowUnfree, etc.)</td>\n</tr>\n<tr>\n<td><code>purr.autoInject</code></td>\n<td>bool</td>\n<td><code>true</code></td>\n<td>Auto-inject <code>networking.hostName</code>, <code>home.username</code>, etc.</td>\n</tr>\n</tbody>\n</table>\n<pre><code><span class=\"source\"><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\">defaultSystems</span>  <span class=\"comment\"># [\"x86_64-linux\" \"aarch64-linux\" \"aarch64-darwin\"]</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\">eachSystem</span> <span class=\"punctuation definition list\">[</span><span class=\"invalid illegal\">.</span><span class=\"invalid illegal\">.</span><span class=\"invalid illegal\">.</span><span class=\"punctuation definition list\">]</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\">eachDefaultSystem</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\">collectModules</span>  <span class=\"comment\"># flatten nested modules to a list</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\">loadModules</span>     <span class=\"comment\"># recursively load .nix files from a dir</span>\n</span></code></pre>\n<h2 id=\"readme-license\"><a href=\"#readme-license\" rel=\"nofollow noopener noreferrer\">License</a></h2>\n<p>CC0 1.0 Universal</p>\n","repo_url":"https://github.com/nixcafe/purr","revision":"2e7e4d20a3e010180481ed79ea79a6510a41eaf5","simplified_version":"0.1.73","source_github_owner_repo_pair":"nixcafe/purr","source_subdirectory":null,"spdx_identifier":"CC0-1.0","version":"0.1.73+rev-2e7e4d20a3e010180481ed79ea79a6510a41eaf5","visibility":"public"}