uuid: - value: 7d1bee5e-19f0-4e40-b24a-6bbd162432d3 langcode: - value: en type: - target_id: daily_email target_type: node_type target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7 revision_timestamp: - value: '2025-07-19T22:39:30+00:00' revision_uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 revision_log: { } status: - value: true uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 title: - value: 'Nix and the Dendritic pattern' created: - value: '2025-07-17T22:38:53+00:00' changed: - value: '2025-07-19T22:39:30+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: '' pid: null langcode: en body: - value: |- As I wrote yesterday, [no two Nix configurations are the same][0]. As well as having different packages and configuration options, Nix configurations can all be structured differently - similar to Drupal websites. Some are simple and others are very complex and manage many systems. A lot of people will publish their dotfiles/Nix/NixOS configurations online for others to read and take inspiration from. I was reading someone's code yesterday and found a pattern they wrote about called [the Dendritic pattern][2]. Using the flake-parts module system, every file when using this pattern is a flake-parts module. This is different to most configurations, where only some files are modules and others are imported as needed within other files. From another perspective, [having consistency][1] and following a strict convention makes things like auto-importing modules possible. I like it solves a problem, making configurations easier to maintain as each file is responsible for adding one feature and are self-contained so things can easily be re-organised. If I was writing my configuration from scratch, this is the approach I'd take. Or, I may start looking to refactor my current configuration soon to be based on this pattern. [0]: /daily/2025/07/16/drupal-and-nix-similarities [1]: /daily/2023/04/18/consistency-is-key [2]: https://github.com/mightyiam/dendritic format: markdown processed: |

As I wrote yesterday, no two Nix configurations are the same.

As well as having different packages and configuration options, Nix configurations can all be structured differently - similar to Drupal websites.

Some are simple and others are very complex and manage many systems.

A lot of people will publish their dotfiles/Nix/NixOS configurations online for others to read and take inspiration from.

I was reading someone's code yesterday and found a pattern they wrote about called the Dendritic pattern.

Using the flake-parts module system, every file when using this pattern is a flake-parts module.

This is different to most configurations, where only some files are modules and others are imported as needed within other files.

From another perspective, having consistency and following a strict convention makes things like auto-importing modules possible.

I like it solves a problem, making configurations easier to maintain as each file is responsible for adding one feature and are self-contained so things can easily be re-organised.

If I was writing my configuration from scratch, this is the approach I'd take.

Or, I may start looking to refactor my current configuration soon to be based on this pattern.

summary: '' field_daily_email_cta: - target_type: node target_uuid: c74de3cf-5362-4d08-935a-a9d0d22fcb94