<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flake-Parts on Simon Shine</title><link>https://simonshine.dk/tags/flake-parts/</link><description>Recent content in Flake-Parts on Simon Shine</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 05 Jul 2026 02:35:37 +0200</lastBuildDate><atom:link href="https://simonshine.dk/tags/flake-parts/index.xml" rel="self" type="application/rss+xml"/><item><title>A dendritic sops-nix flake template</title><link>https://simonshine.dk/articles/dendritic-sops-nix-flake-template/</link><pubDate>Sun, 05 Jul 2026 02:35:37 +0200</pubDate><guid>https://simonshine.dk/articles/dendritic-sops-nix-flake-template/</guid><description>&lt;p&gt;This tutorial sets up a flake using flake-parts, import-tree, devshell and sops-nix.&lt;/p&gt;
&lt;p&gt;You can see the template here: &lt;a href="https://github.com/sshine/nix-sops-flake-template"&gt;https://github.com/sshine/nix-sops-flake-template&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unlike agenix/ragenix, the sops-nix NixOS module does not require importing
a Nix file describing recipients, so it composes cleanly inside flake-parts
modules without triggering &lt;a href="https://nix.dev/manual/nix/2.26/language/import-from-derivation"&gt;IFDs&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="1-a-dendritic-flake"&gt;
 1. A dendritic flake
 &lt;a class="heading-anchor" href="#1-a-dendritic-flake" aria-label="Link to this section"&gt;&amp;para;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;This flake auto-imports all .nix files in lib/.&lt;/p&gt;
&lt;p&gt;You may want for that directory to be named something else, depending on your project.&lt;/p&gt;</description></item><item><title>Dendritic flake partitions</title><link>https://simonshine.dk/articles/dendritic-flake-partitions/</link><pubDate>Sun, 21 Jun 2026 13:39:00 +0200</pubDate><guid>https://simonshine.dk/articles/dendritic-flake-partitions/</guid><description>&lt;h2 id="tldr"&gt;
 tl;dr
 &lt;a class="heading-anchor" href="#tldr" aria-label="Link to this section"&gt;&amp;para;&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Some of my sandboxed CLI agents aren&amp;rsquo;t in nixpkgs, so they ride along as flake inputs.&lt;/li&gt;
&lt;li&gt;They&amp;rsquo;re heavy, and were polluting the &lt;code&gt;flake.lock&lt;/code&gt; of every machine that consumes the flake.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flake.parts/options/flake-parts-partitions"&gt;flake-parts partitions&lt;/a&gt; move those inputs into a nested flake that&amp;rsquo;s only evaluated when you actually
build the thing.&lt;/li&gt;
&lt;li&gt;Because my flake is dendritic (&lt;a href="https://github.com/denful/import-tree"&gt;import-tree&lt;/a&gt;), I tuck that nested flake inside the import tree using import-tree&amp;rsquo;s ignored-paths convention: &lt;code&gt;_inputs/flake.{nix,lock}&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While researching this I found a good guide, &lt;a href="https://github.com/Doc-Steve/dendritic-design-with-flake-parts"&gt;Dr. Steve&amp;rsquo;s Dendritic Design with the Flake Parts
Framework: A guide on how to structure your Nix code with Flake Parts using the Dendritic
Pattern&lt;/a&gt;. It covers aspects,
collectors, factories, but doesn&amp;rsquo;t mention flake-parts partitions or lazy input loading.&lt;/p&gt;</description></item><item><title>Dendritic Nix With nixos-shell</title><link>https://simonshine.dk/articles/dendritic-nix-with-nixos-shell/</link><pubDate>Sun, 01 Mar 2026 14:03:12 +0100</pubDate><guid>https://simonshine.dk/articles/dendritic-nix-with-nixos-shell/</guid><description>&lt;h2 id="tldr"&gt;
 tl;dr
 &lt;a class="heading-anchor" href="#tldr" aria-label="Link to this section"&gt;&amp;para;&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;rsquo;m refactoring my system flake using &lt;a href="https://github.com/mightyiam/dendritic/"&gt;The Dendritic Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;m testing the system flake using &lt;a href="https://github.com/Mic92/nixos-shell"&gt;&lt;code&gt;nixos-shell&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ll completely wipe my laptop&amp;rsquo;s NixOS installation when ready&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-contents"&gt;
 Table of contents
 &lt;a class="heading-anchor" href="#table-of-contents" aria-label="Link to this section"&gt;&amp;para;&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#motivation-some-ranting"&gt;Motivation (some ranting)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-is-a-dendritic-flake"&gt;What is a dendritic flake?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-is-nixos-shell"&gt;What is nixos-shell?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-bootstrap"&gt;The bootstrap&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="motivation-some-ranting"&gt;
 Motivation (some ranting)
 &lt;a class="heading-anchor" href="#motivation-some-ranting" aria-label="Link to this section"&gt;&amp;para;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Last week I &lt;a href="https://simonshine.dk/articles/nixos-anywhere-on-hetzner/"&gt;experimented with &lt;code&gt;nixos-anywhere&lt;/code&gt;, &lt;code&gt;deploy-rs&lt;/code&gt; and &lt;code&gt;disko&lt;/code&gt; on Hetzner&lt;/a&gt; which
lets me easily deploy NixOS on a Hetzner VM even though NixOS is not one of the dashboard options.&lt;/p&gt;</description></item></channel></rss>