You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dev/book/src/Dendritic.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
[Dendritic](https://github.com/mightyiam/dendritic) is a [pattern](https://discourse.nixos.org/t/pattern-every-file-is-a-flake-parts-module/61271) for writing nix configurations based on [flake-parts](https://flake.parts)'s [`modules` option](https://flake.parts/options/flake-parts-modules.html).
4
4
5
-
We say that Dendritic nix configurations are _aspect-oriented_ meaning that each nix file
5
+
We say that Dendritic nix configurations are _aspect-oriented_, meaning that each nix file
6
6
provides config-values for the same _aspect_ across different nix configuration classes.
7
7
8
8
This is done via flake-parts' `flake.modules.<class>.<aspect>` options.
@@ -43,9 +43,9 @@ will notice your code now incorporates the following:
43
43
44
44
## Denritic Advantages
45
45
46
-
### No need to use specialArgs for communicating values.
46
+
### No need to use `specialArgs` for communicating values.
47
47
48
-
A common pattern for passing values between different nix configurations types (eg between a `nixos` config and a `homeManager` one),
48
+
A common pattern for passing values between different nix configurations types (e.g., between a `nixos` config and a `homeManager` one),
49
49
is to use the [`specialArgs`](https://nixos.org/manual/nixos/stable/options#opt-_module.args) module argument or [`home-manager.extraSpecialArgs`](https://home-manager.dev/manual/23.11/nixos-options.xhtml#nixos-opt-home-manager.extraSpecialArgs).
50
50
51
51
This is considered an _anti-pattern in dendritic setups_, since there's no need to use `specialArgs` at all. Because you can
@@ -89,7 +89,7 @@ This is possible because:
89
89
In a Dendritic setup, each `.nix` file has only one interpretation: A flake-parts module.
90
90
91
91
Unlike other kinds of setup where each nix file can be a `nixos` configuration, or a `home-manager` configuration, or
92
-
a package, or something entrely different. In such setups, loading a file requires you to know what kind of meaning
92
+
a package, or something entirely different. In such setups, loading a file requires you to know what kind of meaning
93
93
each file has before importing it.
94
94
95
95
This leads us to having:
@@ -147,7 +147,7 @@ instead of where they are applied.
147
147
148
148
### Feature _Closures_
149
149
150
-
By closure we mean: everything that is needed for a given _feature_ to work is
150
+
By closure, we mean: everything that is needed for a given _feature_ to work is
151
151
configured closely, in the same unit (file/directory named after the feature).
152
152
153
153
Because a single `feature.nix` contributes to different configuration classes, it has all
@@ -169,7 +169,7 @@ files from your modules (or adding an `_` for them to be ignored) has no
169
169
other impact than the overall capabilities provided into your systems.
170
170
171
171
This is an easy way to disable loading files while on a huge refactor. Or when some hosts
172
-
or features should be decomissioned immediatly/temporarily.
172
+
or features should be decommissioned immediately/temporarily.
0 commit comments