diff --git a/content/meta/index.json b/content/meta/index.json index 1f2e931b4..9c9e0abf3 100644 --- a/content/meta/index.json +++ b/content/meta/index.json @@ -7150,5 +7150,12 @@ ], "path_alias.95061d48-00b7-40c9-b2ae-b56eb12b18df": [ "node.b05b1275-cbe8-4bec-9301-0b096ee6edc5" + ], + "node.9be0f54b-1afd-41ca-9cc3-f8b169645b66": [ + "user.b8966985-d4b2-42a7-a319-2e94ccfbb849", + "node.e3f6c728-7855-4804-8614-e2a0c08c368f" + ], + "path_alias.f620ce9b-e7ce-4f46-85df-f136d6591957": [ + "node.9be0f54b-1afd-41ca-9cc3-f8b169645b66" ] } \ No newline at end of file diff --git a/content/node.9be0f54b-1afd-41ca-9cc3-f8b169645b66.yml b/content/node.9be0f54b-1afd-41ca-9cc3-f8b169645b66.yml new file mode 100644 index 000000000..82ac4b04f --- /dev/null +++ b/content/node.9be0f54b-1afd-41ca-9cc3-f8b169645b66.yml @@ -0,0 +1,76 @@ +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 diff --git a/content/path_alias.f620ce9b-e7ce-4f46-85df-f136d6591957.yml b/content/path_alias.f620ce9b-e7ce-4f46-85df-f136d6591957.yml new file mode 100644 index 000000000..2a51a4171 --- /dev/null +++ b/content/path_alias.f620ce9b-e7ce-4f46-85df-f136d6591957.yml @@ -0,0 +1,10 @@ +uuid: + - value: f620ce9b-e7ce-4f46-85df-f136d6591957 +langcode: + - value: en +path: + - value: /node/9be0f54b-1afd-41ca-9cc3-f8b169645b66 +alias: + - value: /daily/2025/07/22/implementing-dendritic-pattern +status: + - value: true