Skip to content
/ dendrix Public

Commit 70c01ec

Browse files
committed
Add example of applying same aspect on linux and darwin
1 parent 7afc930 commit 70c01ec

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

dev/book/src/Dendritic.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,25 @@ As noted by Pol Dellaiera in [Flipping the Configuration Matrix](https://not-a-n
145145
> the configuration is now structured around features, not hostnames. It is a shift in the axis of composition, essentially an inversion of configuration control. What may seem like a subtle change at first has profound implications for flexibility, reuse, and maintainability.
146146
147147
You will notice that you start naming your files around the `aspect`s (features) they define
148-
instead of where they are applied.
148+
instead of where they are specifically applied.
149+
150+
In the following example, the `scrolling-desktop` aspect is included accross different operating systems:
151+
On Linux, `flake.modules.nixos.scrolling-destop` might enable [`niri`](https://variety4me.github.io/niri_docs/) and on MacOS, `flake.modules.darwin.scrolling-desktop` might enable [`PaperWM.spoon`](https://github.com/mogenson/PaperWM.spoon).
152+
153+
```nix
154+
# ./modules/hosts.nix
155+
{ inputs, ... }:
156+
{
157+
flake.nixosConfigurations.my-host = inputs.nixpkgs.lib.nixosSystem {
158+
system = "aarm64-linux";
159+
modules = with inputs.self.modules.nixos; [ ai ssh vpn mac-like-keyboard scrolling-desktop ];
160+
};
161+
flake.darwinConfigurations.my-host = inputs.nix-darwin.lib.darwinSystem {
162+
system = "aarm64-darwin";
163+
modules = with inputs.self.modules.darwin; [ ai ssh vpn scrolling-desktop ];
164+
};
165+
}
166+
```
149167

150168
### Feature _Closures_
151169

0 commit comments

Comments
 (0)