+1
-1
.github/FUNDING.yml
+1
-1
.github/FUNDING.yml
···
1
1
# These are supported funding model platforms
2
2
3
-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3
+
github: [vic] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
4
patreon: # Replace with a single Patreon username
5
5
open_collective: # Replace with a single Open Collective username
6
6
ko_fi: oeiuwq # Replace with a single Ko-fi username
+75
-423
README.md
+75
-423
README.md
···
1
-
# vix - A Dendritic NixOS Configuration
2
-
3
-
A complete example of the **dendritic pattern** for NixOS, using [den](https://github.com/vic/den) to achieve composable, aspect-oriented system configuration.
1
+
# vix - Vic's Nix Environment - and dendritic example repo.
4
2
5
-
This repository demonstrates how to structure a real-world NixOS setup using:
6
-
- [den](https://github.com/vic/den) - Dendritic configuration framework
7
-
- [flake-aspects](https://github.com/vic/flake-aspects) - Aspect-oriented programming for Nix
8
-
- [flake-file](https://github.com/vic/flake-file) - Auto-generated flake management
9
-
- [import-tree](https://github.com/vic/import-tree) - Automatic module discovery
3
+
My repo serves as an educational example showing how [den](https://github.com/vic/den) and my related [libs](https://vic.github.io/dendrix/Dendritic-Ecosystem.html#vics-dendritic-libraries) structure a [Dendritic](https://vic.github.io/dendrix/Dendritic.html) NixOS setup with **named, composable aspects** instead of file imports. This is just one of many possible ways to organize a dendritic implementation. Feel free to explore, and share how you do things.
10
4
11
-
## Try It Out
12
5
13
-
Experience the dendritic pattern immediately:
14
-
```bash
15
-
nix run github:vic/vix/den#vm
16
-
```
6
+
This specific setup is powered by **[den](https://github.com/vic/den) · [flake-aspects](https://github.com/vic/flake-aspects) · [denful](https://github.com/vic/denful) · [flake-file](https://github.com/vic/flake-file) · [import-tree](https://github.com/vic/import-tree) · [flake-parts](https://github.com/hercules-ci/flake-parts)**
17
7
18
-
This launches a VM configured with the same dendritic structure as the production system.
8
+
--
19
9
20
-
## Understanding the Dendritic Structure
10
+
## Aspects vs Imports
21
11
22
-
### 🎯 Core Concept: Aspects Over Modules
12
+
```nix
13
+
# Traditional imports # Dendritic aspects
14
+
imports = [ vix.nargun.includes = [
15
+
./hardware.nix vix.hardware
16
+
../../shared/desktop.nix vix.niri-desktop
17
+
]; ];
18
+
```
23
19
24
-
Traditional NixOS configurations use modules that get imported into a monolithic tree. The dendritic pattern uses **aspects**—named, composable units that can be mixed and matched without creating deep import hierarchies.
20
+
Aspects are named values, not file paths. They compose without relative path juggling.
25
21
26
-
### 📁 Repository Structure
22
+
## How It's Wired
27
23
28
24
```
29
25
modules/
30
-
├── dendritic.nix # Entry point: initializes dendritic setup
31
-
├── vix.nix # Custom aspect namespace
32
-
├── hosts.nix # Host declarations & default profiles
33
-
├── vm.nix # VM launcher for development
34
-
│
35
-
├── community/ # Reusable aspects (candidate for upstreaming)
36
-
│ ├── profile.nix # Host/user profile hooks
37
-
│ ├── unfree.nix # Aspect for unfree packages
38
-
│ ├── autologin.nix # Parametric autologin aspect
39
-
│ ├── *-desktop.nix # Desktop environment aspects
40
-
│ └── dev-laptop.nix # Composed laptop aspect
41
-
│
42
-
├── vic/ # User-specific aspects
43
-
│ ├── common-host-env.nix # User environment composition
44
-
│ ├── admin.nix # User permissions aspect
45
-
│ ├── fish.nix # Shell configuration aspect
46
-
│ ├── dots.nix # Dotfile management aspect
47
-
│ └── *.nix # Individual feature aspects
48
-
│
49
-
└── hosts/
50
-
└── nargun.nix # Host-specific aspect composition with vm variant.
26
+
├── dendritic.nix # Bootstraps dendritic libs
27
+
├── community/vix.nix # Creates vix.* namespace
28
+
├── hosts.nix # Declares hosts, wires default profiles
29
+
├── community/
30
+
│ └── profile.nix # Defines host-profile and user-profile hooks
31
+
├── hosts/
32
+
│ └── nargun.nix # Composes aspects for nargun host
33
+
└── vic/
34
+
└── common-host-env.nix # Composes user environment aspects
51
35
```
52
36
53
-
## Key Benefits of This Structure
37
+
## Key Patterns
54
38
55
-
### 1. **Namespace Isolation** ([`vix.nix`](modules/vix.nix))
56
-
57
-
Created my own aspect namespace without polluting the global scope:
58
-
39
+
### 1. Custom Namespace ([`vix.nix`](modules/community/vix.nix))
59
40
```nix
60
-
# vix is actually: den.aspects.vix.provides.
61
-
{ vix, ... }: { # read access
62
-
vix.gaming = ...; # write access
63
-
}
41
+
den.aspects.vix.provides = { }; # you can also use flake.aspects to expose all to flake.modules.
42
+
flake.vix = config.den.aspects.vix.provides; # I just want to expose the vix aspect tree.
43
+
_module.args.vix = config.den.aspects.vix.provides;
64
44
```
65
45
66
-
**Benefit**: All my aspects live under `vix.*`, making it clear what's yours vs. what comes from den or other sources.
46
+
Creates `vix.*` namespace. Everything under `vix` belongs to this config.
67
47
68
-
### 2. **Declarative Host Registration** ([`hosts.nix`](modules/hosts.nix))
48
+
The `vix` namespace is written to directly, and read from module args, it is also shared as a flake output.
49
+
Meaning other people can do `_module.args.vix = inputs.vix.vix`, and re-use modules from this repository's `community/` exactly as they are. Adopting a namespace for your aspects allows re-use for people using import-tree to load files from community repos.
69
50
70
-
Declare hosts and users in one place:
71
51
72
-
```nix
73
-
den.hosts.x86_64-linux.nargun.users.vic = { };
74
-
den.hosts.x86_64-linux.nargun-vm.users.vic = { };
75
-
```
76
52
77
-
**Benefit**: Clear overview of your infrastructure. No hidden host definitions scattered across files.
78
-
79
-
### 3. **Profile Hooks for Automatic Composition** ([`profile.nix`](modules/community/profile.nix))
80
-
81
-
Set default includes for all hosts and users:
82
-
53
+
### 2. Central Host Declaration ([`hosts.nix`](modules/hosts.nix))
83
54
```nix
84
-
den.default.host._.host.includes = [
85
-
vix.host-profile
86
-
den.home-manager
87
-
];
55
+
den.hosts.x86_64-linux.nargun.users.vic = { };
88
56
89
-
den.default.user._.user.includes = [
90
-
vix.user-profile
91
-
];
57
+
den.default.host._.host.includes = [ vix.host-profile ];
58
+
den.default.user._.user.includes = [ vix.user-profile ];
92
59
```
93
-
94
-
**Benefit**: Every host/user automatically gets base configuration without manual wiring. Add once, applies everywhere.
95
-
96
-
### 4. **Parametric Aspects** ([`profile.nix`](modules/community/profile.nix))
60
+
All hosts declared here. Default profiles automatically applied to every host/user.
97
61
98
-
Profiles can dynamically select aspects based on host/user names:
99
-
62
+
### 3. Dynamic Profile Routing ([`profile.nix`](modules/community/profile.nix))
100
63
```nix
101
64
vix.host-profile = { host }: {
102
-
includes = [
103
-
(vix.${host.name} or { }) # Host-specific if exists
104
-
(vix.host-name host) # Parametric hostname setter
105
-
vix.state-version # Common to all hosts
106
-
];
65
+
# access host profile from vix, many modules can contribute to the same aspect.
66
+
includes = [ vix.${host.name} ];
107
67
};
108
-
```
109
68
110
-
**Benefit**: Generic code that adapts to context. No hardcoded names, fully reusable.
111
-
112
-
### 5. **Aspect Composition** ([`nargun.nix`](modules/hosts/nargun.nix))
113
-
114
-
Hosts are built by composing aspects:
115
-
116
-
```nix
117
-
vix.nargun.includes = [
118
-
vix.nargun._.base
119
-
vix.nargun._.hw
120
-
];
121
-
122
-
vix.nargun.provides = {
123
-
hw.includes = [
124
-
vix.mexico # Locale configuration
125
-
vix.bootable # Boot loader setup
126
-
vix.kvm-amd # Virtualization support
127
-
vix.niri-desktop # Window manager
128
-
vix.kde-desktop # Fallback desktop
129
-
];
130
-
131
-
base.includes = [
132
-
vix.dev-laptop # Common laptop features
133
-
];
69
+
vix.user-profile = { host, user }: {
70
+
# users can enhance the host they are part of, by providing aspects to it.
71
+
includes = [ (vix.${user.name}._.common-host-env { inherit host user; }) ];
134
72
};
135
73
```
136
-
137
-
**Benefit**:
138
-
- Mix hardware configs, desktops, and features freely
139
-
- Share common setups between real hardware and VM
140
-
- Easy to see what a host includes at a glance
141
-
142
-
### 6. **Shared Configuration Between Host Variants** ([`nargun.nix`](modules/hosts/nargun.nix))
143
-
144
-
Production and VM hosts share a base:
145
-
146
-
```nix
147
-
vix.nargun-vm.includes = [
148
-
vix.nargun._.base # Shared configuration
149
-
vix.nargun._.vm # VM-specific overrides
150
-
];
151
-
```
152
-
153
-
**Benefit**: Test your actual configuration in a VM with minimal differences. No "works on my VM" problems.
154
-
155
-
### 7. **Hierarchical Aspect Organization** ([`nargun.nix`](modules/hosts/nargun.nix))
156
-
157
-
Use `provides` to create sub-aspects:
74
+
Profiles select aspects by host/user name. `vix.nargun` wired automatically for nargun host.
158
75
76
+
### 4. Aspect Composition with Variants ([`nargun.nix`](modules/hosts/nargun.nix))
159
77
```nix
160
78
vix.nargun.provides = {
161
-
base.includes = [...]; # vix.nargun._.base
162
-
hw.includes = [...]; # vix.nargun._.hw
163
-
vm.includes = [...]; # vix.nargun._.vm
79
+
base.includes = [ vix.dev-laptop ];
80
+
hw.includes = [ vix.kvm-amd vix.niri-desktop ];
164
81
};
82
+
83
+
vix.nargun.includes = [ vix.nargun._.base vix.nargun._.hw ];
84
+
vix.nargun-vm.includes = [ vix.nargun._.base vix.nargun._.vm ];
165
85
```
86
+
Sub-aspects via `provides.X` become `_.X`. Hardware and VM share `base`.
166
87
167
-
**Benefit**: Organize related configuration without creating separate files. The `_` makes sub-aspects non-recursive.
168
-
169
-
### 8. **User Environment Composition** ([`common-host-env.nix`](modules/vic/common-host-env.nix))
170
-
171
-
Compose user environments from small, focused aspects:
172
-
88
+
### 5. User Environment Assembly ([`common-host-env.nix`](modules/vic/common-host-env.nix))
173
89
```nix
174
90
vix.vic._.common-host-env = { host, user }: {
175
91
includes = map (f: f { inherit host user; }) [
176
92
vix.vic.provides.admin
177
93
vix.vic.provides.fish
178
-
vix.vic.provides.terminals
179
-
vix.vic.provides.editors
180
-
vix.vic.provides.doom-btw
181
-
vix.vic.provides.vim-btw
182
94
// ... more aspects
183
95
];
184
96
};
185
97
```
186
-
187
-
**Benefit**:
188
-
- Each aspect is small, testable, focused
189
-
- Easy to enable/disable features
190
-
- Functions receive context (`host`, `user`) for parametric behavior
191
-
192
-
### 9. **Parametric, Generic Aspects** ([`admin.nix`](modules/vic/admin.nix), [`fish.nix`](modules/vic/fish.nix))
193
-
194
-
Aspects accept parameters instead of hardcoding values:
98
+
User profile calls this with context. Each aspect receives `{ host, user }`.
195
99
100
+
### 6. Multi-Class Aspects ([`fish.nix`](modules/vic/fish.nix))
196
101
```nix
197
-
# admin.nix
198
-
vix.vic.provides.admin = { user, ... }: {
199
-
nixos.users.users.${user.userName} = {
200
-
isNormalUser = true;
201
-
extraGroups = [ "wheel" "networkmanager" ];
202
-
};
203
-
};
204
-
205
-
# fish.nix
206
102
vix.vic.provides.fish = { user, ... }: {
207
103
nixos.users.users.${user.userName}.shell = pkgs.fish;
208
104
homeManager.programs.fish.enable = true;
209
105
};
210
106
```
211
-
212
-
**Benefit**: Aspects are reusable across different users/hosts. Change username once in host declaration, everything updates.
213
-
214
-
### 10. **Multi-Class Aspects** ([`fish.nix`](modules/vic/fish.nix))
215
-
216
-
Single aspect can configure multiple "classes" (nixos, homeManager, darwin, etc.):
217
-
218
-
```nix
219
-
vix.vic.provides.fish = { user, ... }: {
220
-
nixos = { pkgs, ... }: {
221
-
programs.fish.enable = true;
222
-
users.users.${user.userName}.shell = pkgs.fish;
223
-
};
224
-
225
-
homeManager = {
226
-
programs.fish.enable = true;
227
-
};
228
-
};
229
-
```
230
-
231
-
**Benefit**: Related configuration stays together. System-level and user-level config for one feature in one file.
232
-
233
-
### 11. **Reusable Community Aspects** ([`modules/community/`](modules/community/))
234
-
235
-
Structure promotes sharing:
236
-
237
-
```
238
-
community/
239
-
├── profile.nix # Integration hooks
240
-
├── unfree.nix # Unfree package handling
241
-
├── autologin.nix # Parametric autologin
242
-
├── *-desktop.nix # Desktop environments
243
-
└── dev-laptop.nix # Feature compositions
244
-
```
245
-
246
-
**Benefit**:
247
-
- Clear separation of reusable vs. personal
248
-
- Easy to upstream to [denful](https://github.com/vic/denful)
249
-
- Stop copy-pasting, start sharing
250
-
251
-
### 12. **Functional Aspects with Parameters** ([`unfree.nix`](modules/community/unfree.nix))
252
-
253
-
Aspects can be functions that return aspects:
254
-
255
-
```nix
256
-
vix.unfree = allowed-names: {
257
-
__functor = _: { class, aspect-chain }: {
258
-
${class}.nixpkgs.config.allowUnfreePredicate =
259
-
pkg: builtins.elem (lib.getName pkg) allowed-names;
260
-
};
261
-
};
107
+
Single aspect configures both system and home-manager.
262
108
263
-
# Usage:
264
-
vix.vic.provides.editors.includes = [
265
-
(vix.unfree [ "cursor" "vscode" ])
266
-
];
267
-
```
109
+
## The Flow
268
110
269
-
**Benefit**: Create aspect factories. Same pattern, different parameters. No duplication.
111
+
1. **[`dendritic.nix`](modules/dendritic.nix)** loads dendritic libs
112
+
2. **[`vix.nix`](modules/vix.nix)** creates namespace (`vix.*`)
113
+
3. **[`hosts.nix`](modules/hosts.nix)** declares hosts and wires profiles:
114
+
- `den.hosts.x86_64-linux.nargun.users.vic = { }`
115
+
- Every host includes `vix.host-profile`
116
+
- Every user includes `vix.user-profile`
117
+
4. **[`profile.nix`](modules/community/profile.nix)** routes by name:
118
+
- `vix.host-profile` → `vix.${host.name}` (e.g., `vix.nargun`)
119
+
- `vix.user-profile` → `vix.${user.name}._.common-host-env`
120
+
5. **[`nargun.nix`](modules/hosts/nargun.nix)** composes host aspects
121
+
6. **[`common-host-env.nix`](modules/vic/common-host-env.nix)** composes user aspects
270
122
271
-
### 13. **Development Workflow with VM** ([`vm.nix`](modules/vm.nix))
272
-
273
-
Package your system as a runnable VM:
274
-
275
-
```nix
276
-
packages.vm = pkgs.writeShellApplication {
277
-
name = "vm";
278
-
text = ''
279
-
${inputs.self.nixosConfigurations.nargun-vm.config.system.build.vm}/bin/run-nargun-vm-vm "$@"
280
-
'';
281
-
};
282
-
```
283
-
284
-
**Benefit**:
285
-
- Test configuration changes without rebooting
286
-
- Share exact system state with others via `nix run`
287
-
- Rapid iteration during development
288
-
289
-
### 14. **Smart Dotfile Management** ([`dots.nix`](modules/vic/dots.nix))
290
-
291
-
Out-of-store symlinks for live editing:
292
-
293
-
```nix
294
-
dotsLink = path:
295
-
config.lib.file.mkOutOfStoreSymlink
296
-
"${config.home.homeDirectory}/.flake/modules/vic/dots/${path}";
297
-
298
-
home.file.".config/nvim".source = dotsLink "config/nvim";
299
-
```
300
-
301
-
**Benefit**: Edit dotfiles directly, changes reflect immediately without rebuilding. Best of both worlds.
302
-
303
-
## Getting Started with Dendritic
304
-
305
-
### 1. Bootstrap from Template
306
-
307
-
```bash
308
-
nix flake init -t github:vic/flake-file#dendritic
309
-
nix flake update
310
-
```
311
-
312
-
This creates:
313
-
- [`modules/dendritic.nix`](modules/dendritic.nix) - Den initialization
314
-
- Basic structure following the pattern
315
-
316
-
### 2. Create Your Namespace ([`vix.nix`](modules/vix.nix))
317
-
318
-
```nix
319
-
{ config, lib, ... }:
320
-
{
321
-
den.aspects.myname.provides = { };
322
-
_module.args.myname = config.den.aspects.myname.provides;
323
-
flake.myname = config.den.aspects.myname.provides;
324
-
imports = [ (lib.mkAliasOptionModule [ "myname" ] [ "den" "aspects" "myname" "provides" ]) ];
325
-
}
326
-
```
327
-
328
-
### 3. Register Hosts ([`hosts.nix`](modules/hosts.nix))
329
-
330
-
```nix
331
-
{ myname, den, ... }:
332
-
{
333
-
den.hosts.x86_64-linux.myhost.users.myuser = { };
334
-
335
-
den.default.host._.host.includes = [
336
-
myname.host-profile
337
-
den.home-manager
338
-
];
339
-
340
-
den.default.user._.user.includes = [
341
-
myname.user-profile
342
-
];
343
-
}
344
-
```
345
-
346
-
### 4. Create Profile Hooks (see [`profile.nix`](modules/community/profile.nix))
347
-
348
-
```nix
349
-
myname.host-profile = { host }: {
350
-
includes = [
351
-
(myname.${host.name} or { })
352
-
myname.state-version
353
-
];
354
-
};
355
-
356
-
myname.user-profile = { host, user }: {
357
-
includes = [
358
-
((myname.${user.name}._.common-host-env or (_: { })) { inherit host user; })
359
-
];
360
-
};
361
-
```
362
-
363
-
### 5. Define Host Aspects (see [`nargun.nix`](modules/hosts/nargun.nix))
364
-
365
-
```nix
366
-
{ myname, ... }:
367
-
{
368
-
myname.myhost.includes = [
369
-
myname.bootable
370
-
myname.networking
371
-
myname.my-desktop
372
-
];
373
-
}
374
-
```
375
-
376
-
### 6. Build User Environment (see [`common-host-env.nix`](modules/vic/common-host-env.nix))
377
-
378
-
```nix
379
-
myname.myuser._.common-host-env = { host, user }: {
380
-
includes = map (f: f { inherit host user; }) [
381
-
myname.myuser.provides.admin
382
-
myname.myuser.provides.shell
383
-
myname.myuser.provides.editor
384
-
];
385
-
};
386
-
```
387
-
388
-
## Design Principles
389
-
390
-
### Aspect Composition Over Module Imports
391
-
392
-
**Traditional NixOS:**
393
-
```nix
394
-
imports = [
395
-
./hardware.nix
396
-
./networking.nix
397
-
./desktop.nix
398
-
./users/vic.nix
399
-
];
400
-
```
401
-
402
-
**Dendritic Pattern:**
403
-
```nix
404
-
vix.nargun.includes = [
405
-
vix.hardware
406
-
vix.networking
407
-
vix.desktop
408
-
];
409
-
```
410
-
411
-
Benefits:
412
-
- Aspects are named and first-class
413
-
- Can be referenced, composed, and parameterized
414
-
- No relative path management
415
-
- Clear dependency relationships
416
-
417
-
### Parametric by Default
418
-
419
-
All aspects should accept `{ host, user }` when relevant:
420
-
421
-
```nix
422
-
# ❌ Hardcoded
423
-
vix.vic.admin.nixos.users.users.vic = { ... };
424
-
425
-
# ✅ Parametric
426
-
vix.vic.provides.admin = { user, ... }: {
427
-
nixos.users.users.${user.userName} = { ... };
428
-
};
429
-
```
430
-
431
-
### Separate Personal from Shareable
432
-
433
-
- `modules/community/` - Reusable, generic, upstreamable
434
-
- `modules/{yourname}/` - Personal, specific to your needs
435
-
- `modules/hosts/` - Host-specific configuration
436
-
437
-
When something in your personal namespace becomes useful, move it to `community/` and consider upstreaming to [denful](https://github.com/vic/denful).
123
+
Result: Declare a host in one place, everything wires automatically via naming convention.
438
124
439
125
## Learning Path
440
126
441
-
Follow this sequence to understand the pattern:
442
-
443
-
1. **[`dendritic.nix`](modules/dendritic.nix)** - How den is initialized
444
-
2. **[`vix.nix`](modules/vix.nix)** - Creating a custom namespace
445
-
3. **[`hosts.nix`](modules/hosts.nix)** - Host registration and default hooks
446
-
4. **[`profile.nix`](modules/community/profile.nix)** - Profile system for automatic composition
447
-
5. **[`nargun.nix`](modules/hosts/nargun.nix)** - Host aspect composition example
448
-
6. **[`common-host-env.nix`](modules/vic/common-host-env.nix)** - User environment composition
449
-
7. **[`admin.nix`](modules/vic/admin.nix)**, **[`fish.nix`](modules/vic/fish.nix)** - Simple parametric aspects
450
-
8. **[`unfree.nix`](modules/community/unfree.nix)** - Advanced: functional aspects
451
-
9. **[`vm.nix`](modules/vm.nix)** - Development workflow
452
-
453
-
## Contributing to the Dendritic Ecosystem
454
-
455
-
Found something useful in this repo? Instead of copy-pasting:
456
-
457
-
1. Move it to `modules/community/` if it's not already there
458
-
2. Make it parametric and generic
459
-
3. Open an issue to discuss upstreaming to [denful](https://github.com/vic/denful)
460
-
461
-
The goal is to build a library of well-maintained, composable aspects that everyone can benefit from.
462
-
463
-
## Migration Notes
464
-
465
-
This repository represents a complete rewrite of vix using the dendritic pattern. The old monolithic approach is preserved in the `main` branch for reference.
466
-
467
-
**Development workflow:** Boot from stable `main` branch, edit this `den` branch, test changes via `nix run .#vm` without rebooting.
127
+
Follow the flow above, then explore:
128
+
- **[`fish.nix`](modules/vic/fish.nix)** - Simple parametric aspect
129
+
- **[`unfree.nix`](modules/community/unfree.nix)** - Aspect factory pattern
130
+
- **[`vm.nix`](modules/vm.nix)** - Package system as VM: `nix run github:vic/vix/den#vm`
468
131
469
132
## Why Dendritic?
470
133
471
-
Traditional NixOS configurations grow into tangled import trees. You end up with:
472
-
- Deep hierarchies hard to navigate
473
-
- Unclear dependencies
474
-
- Difficulty reusing configuration
475
-
- Copy-paste proliferation
476
134
477
-
The dendritic pattern solves this by:
478
-
- **Named aspects** instead of file paths
479
-
- **Composition** instead of inheritance
480
-
- **Parameters** instead of hardcoded values
481
-
- **Namespaces** instead of global scope
482
-
- **Automatic discovery** via import-tree
483
-
- **First-class functions** for aspect factories
135
+
- Named aspects instead of manual imports.
484
136
485
-
The result: configuration that's easier to understand, modify, test, and share.
137
+
- Functional Composition instead of Duplication.
486
138
487
-
---
139
+
- Parameters intead of Hardcoding.
488
140
489
-
**See also:** [den documentation](https://github.com/vic/den), [flake-aspects](https://github.com/vic/flake-aspects), [denful](https://github.com/vic/denful)
141
+
- Sharing instead of Copy+Pasting.
+4
-1
modules/vic/editors.nix
+4
-1
modules/vic/editors.nix
+10
-2
modules/vix.nix
modules/community/vix.nix
+10
-2
modules/vix.nix
modules/community/vix.nix
···
1
-
{ config, lib, ... }:
1
+
{
2
+
config,
3
+
lib,
4
+
...
5
+
}:
2
6
{
7
+
# create namespace
3
8
den.aspects.vix.provides = { };
4
-
_module.args.vix = config.den.aspects.vix.provides;
9
+
# expose aspect-tree to public
5
10
flake.vix = config.den.aspects.vix.provides;
11
+
# easy access on modules
12
+
_module.args.vix = config.den.aspects.vix.provides;
13
+
# write directly to vix attribute
6
14
imports = [ (lib.mkAliasOptionModule [ "vix" ] [ "den" "aspects" "vix" "provides" ]) ];
7
15
}