Modular, context-aware and aspect-oriented dendritic Nix configurations.
Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/
den.oeiuwq.com
configurations
den
dendritic
nix
aspect
oriented
1{
2 inputs,
3 lib,
4 config,
5 ...
6}:
7let
8 inherit (config) den;
9 types = import ./../nix/types.nix { inherit inputs lib den; };
10 baseMod = lib.mkOption {
11 type = lib.types.deferredModule;
12 default = { };
13 };
14in
15{
16 options.den.hosts = types.hostsOption;
17 options.den.homes = types.homesOption;
18 options.den.schema = {
19 conf = baseMod;
20 host = baseMod;
21 user = baseMod;
22 home = baseMod;
23 };
24 config.den.schema = {
25 host.imports = [ den.schema.conf ];
26 user.imports = [ den.schema.conf ];
27 home.imports = [ den.schema.conf ];
28 };
29}