Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default defineConfig({
{ label: 'From Flake to Den', slug: 'guides/from-flake-to-den' },
{ label: 'Declare Hosts & Users', slug: 'guides/declare-hosts' },
{ label: 'Configure Aspects', slug: 'guides/configure-aspects' },
{ label: 'Host<->User Mutual Config', slug: 'guides/bidirectional' },
{ label: 'Host<->User Mutual Config', slug: 'guides/mutual' },
{ label: 'Custom Nix Classes', slug: 'guides/custom-classes' },
{ label: 'Homes Integration', slug: 'guides/home-manager' },
{ label: 'Use Batteries', slug: 'guides/batteries' },
Expand Down
17 changes: 6 additions & 11 deletions docs/src/content/docs/guides/batteries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,22 @@ den.default.includes = [ den.provides.hostname ];

### `den.provides.mutual-provider`

Allows hosts and users to contribute configuration **to each other** through `provides`:
Allows hosts and users to contribute configuration **to each other** through `.provides.`:

```nix
den.hosts.x86_64-linux.igloo.users.tux = { };
den.default.includes = [ den._.mutual-provider ];
den.ctx.user.includes = [ den._.mutual-provider ];
```

This is not the same as the built-in bidirectionality:

```nix
# contributes to ALL users of this host
den.aspects.my-host.homeManager = { ... }
den.aspects.my-host.provides.to-users.homeManager = { ... }
# contributes to ALL hosts of where my-user exist
den.aspects.my-user.nixos = { ... }
den.aspects.my-user.provides.to-hosts.nixos = { ... }
```

The difference is that this allows you to wire bidirectionality between
explictly-named hosts/users pairs.

A user providing config TO the host:
A `tux` user providing config to **specific host** `igloo`:

```nix
den.aspects.tux = {
Expand All @@ -68,7 +63,7 @@ den.aspects.tux = {
};
```

A host providing config TO the user:
A host providing config to **specific user** `tux`:

```nix
den.aspects.igloo = {
Expand Down
280 changes: 0 additions & 280 deletions docs/src/content/docs/guides/bidirectional.mdx

This file was deleted.

Loading
Loading