···95Aspects are resolved for a specific class using the `resolve` API from flake-aspects:
9697```nix
98-module = den.aspects.igloo.resolve { class = "nixos"; };
99```
100101Resolution collects all `nixos` attrs from owned configs, walks `includes`
···95Aspects are resolved for a specific class using the `resolve` API from flake-aspects:
9697```nix
98+module = den.lib.aspects.resolve "nixos" [] den.aspects.igloo;
99```
100101Resolution collects all `nixos` attrs from owned configs, walks `includes`
···5152# Resolve for your custom class
53aspect = den.aspects.web-server { env = "production"; };
54-module = aspect.resolve { class = "terranix"; };
55```
5657## Den as a Framework
···5152# Resolve for your custom class
53aspect = den.aspects.web-server { env = "production"; };
54+module = den.lib.aspects.resolve "terranix" [] aspect;
55```
5657## Den as a Framework
+2-2
docs/src/content/docs/guides/debug.md
···62Test how an aspect resolves for a specific class:
6364```console
65-nix-repl> module = den.aspects.laptop.resolve { class = "nixos"; aspect-chain = []; }
66nix-repl> config = (lib.evalModules { modules = [ module ]; }).config
67```
68···7071```console
72nix-repl> aspect = den.aspects.laptop { host = den.hosts.x86_64-linux.laptop; }
73-nix-repl> module = aspect.resolve { class = "nixos"; aspect-chain = []; }
74```
7576## Inspect a Host's Main Module
···62Test how an aspect resolves for a specific class:
6364```console
65+nix-repl> module = den.lib.aspects.resolve "nixos" [] den.aspects.laptop;
66nix-repl> config = (lib.evalModules { modules = [ module ]; }).config
67```
68···7071```console
72nix-repl> aspect = den.aspects.laptop { host = den.hosts.x86_64-linux.laptop; }
73+nix-repl> module = den.lib.aspects.resolve "nixos" [] aspect;
74```
7576## Inspect a Host's Main Module
+2-2
docs/src/content/docs/index.mdx
···135# Use Den API -- Context transformations happen here, nothing is configured yet.
136aspect = den.ctx.host { host = den.hosts.x86_64-linux.igloo; };
137138-# Use flake-aspects API -- We enter the NixOS domain by resolving for the "nixos" class.
139-nixosModule = aspect.resolve { class = "nixos"; };
140141# Use NixOS API -- Instantiate using nixosSystem with the resolved module.
142nixosConfigurations.igloo = lib.nixosSystem { modules = [ nixosModule ]; };
···135# Use Den API -- Context transformations happen here, nothing is configured yet.
136aspect = den.ctx.host { host = den.hosts.x86_64-linux.igloo; };
137138+# Use flake-aspects API (re-exported by Den) -- We enter the NixOS domain by resolving for the "nixos" class.
139+nixosModule = den.lib.aspects.resolve "nixos" [] aspect;
140141# Use NixOS API -- Instantiate using nixosSystem with the resolved module.
142nixosConfigurations.igloo = lib.nixosSystem { modules = [ nixosModule ]; };
+1-1
templates/bogus/modules/test-base.nix
···59 funnyNames =
60 aspect:
61 let
62- mod = aspect.resolve { class = "funny"; };
63 namesMod = {
64 options.names = lib.mkOption {
65 type = lib.types.listOf lib.types.str;
···59 funnyNames =
60 aspect:
61 let
62+ mod = config.den.lib.aspects.resolve "funny" [ ] aspect;
63 namesMod = {
64 options.names = lib.mkOption {
65 type = lib.types.listOf lib.types.str;
-1
templates/microvm/modules/guests-example.nix
···23 };
2425 den.aspects.guest-microvm = {
26- # resolved with: `(den.ctx.host = { host = guest-microvm }).resolve { class = "nixos" }`
27 # resulting nixos-module is set at server: microvm.vms.<name>.config
28 nixos =
29 { pkgs, ... }:
···23 };
2425 den.aspects.guest-microvm = {
026 # resulting nixos-module is set at server: microvm.vms.<name>.config
27 nixos =
28 { pkgs, ... }: