76 lines
3.7 KiB
YAML
76 lines
3.7 KiB
YAML
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: |
|
|
<p>I recently started migrating my NixOS configuration repository to follow <a href="http://localhost:8888/daily/2025/07/19/exploring-dendritic-pattern">the dendritic pattern</a>.</p>
|
|
<p>This is a pattern where each Nix file is its own separate standalone module.</p>
|
|
<p>This makes it easier to refactor and re-organise files, and allows modules to be broken into multiple files.</p>
|
|
<p>Rather than rewrite everything at once, I decided to <a href="http://localhost:8888/daily/2025/07/20/i-dont-large-pull-requests">take an iterative approach</a>.</p>
|
|
<p>This meant refactoring modules in-place within my existing configuration, and keeping everything in a working state.</p>
|
|
<p>I've migrated <a href="https://code.oliverdavies.uk/opdavies/nix-config/src/branch/main/modules2">a number of modules</a>, and will continue working through the remaining ones as time allows.</p>
|
|
<p>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.</p>
|
|
<p>In general, the modules I've migrated have been smaller than what I had before, partly because there's less boilerplate code needed.</p>
|
|
<p>And, whilst there are more files, they are smaller than before, have a single responsibility and <a href="http://localhost:8888/daily/2025/07/04/avoiding-indentation">have less indentation</a> than before - making them easier to read and understand.</p>
|
|
summary: ''
|
|
field_daily_email_cta:
|
|
- target_type: node
|
|
target_uuid: e3f6c728-7855-4804-8614-e2a0c08c368f
|