uuid: - value: 9be0f54b-1afd-41ca-9cc3-f8b169645b66 langcode: - value: en type: - target_id: daily_email target_type: node_type target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7 revision_timestamp: - value: '2025-07-27T10:50:05+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: 'Implementing the dendritic pattern' created: - value: '2025-07-22T10:47:02+00:00' changed: - value: '2025-07-27T10:50:05+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: |- I recently started migrating my NixOS configuration repository to follow [the dendritic pattern][0]. This is a pattern where each Nix file is its own separate standalone module. This makes it easier to refactor and re-organise files, and allows modules to be broken into multiple files. Rather than rewrite everything at once, I decided to [take an iterative approach][1]. This meant refactoring modules in-place within my existing configuration, and keeping everything in a working state. I've migrated [a number of modules][2], and will continue working through the remaining ones as time allows. Once I've refactored everything, I'll go through them again and see what else I can do, like splitting modules into separate smaller files. In general, the modules I've migrated have been smaller than what I had before, partly because there's less boilerplate code needed. And, whilst there are more files, they are smaller than before, have a single responsibility and [have less indentation][3] than before - making them easier to read and understand. [0]: /daily/2025/07/19/exploring-dendritic-pattern [1]: /daily/2025/07/20/i-dont-large-pull-requests [2]: https://code.oliverdavies.uk/opdavies/nix-config/src/branch/main/modules2 [3]: /daily/2025/07/04/avoiding-indentation format: markdown processed: |

I recently started migrating my NixOS configuration repository to follow the dendritic pattern.

This is a pattern where each Nix file is its own separate standalone module.

This makes it easier to refactor and re-organise files, and allows modules to be broken into multiple files.

Rather than rewrite everything at once, I decided to take an iterative approach.

This meant refactoring modules in-place within my existing configuration, and keeping everything in a working state.

I've migrated a number of modules, and will continue working through the remaining ones as time allows.

Once I've refactored everything, I'll go through them again and see what else I can do, like splitting modules into separate smaller files.

In general, the modules I've migrated have been smaller than what I had before, partly because there's less boilerplate code needed.

And, whilst there are more files, they are smaller than before, have a single responsibility and have less indentation than before - making them easier to read and understand.

summary: '' field_daily_email_cta: - target_type: node target_uuid: e3f6c728-7855-4804-8614-e2a0c08c368f