Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

vic/flake-aspects

fake.modules transposition for aspect-oriented Dendritic Nix with cross-aspect dependency resolution.

vic/flake-aspects.json
{
"defaultBranch": "main",
"description": "fake.modules transposition for aspect-oriented Dendritic Nix with cross-aspect dependency resolution.",
"fullName": "vic/flake-aspects",
"homepage": "https://flake-aspects.oeiuwq.com/",
"language": "Nix",
"name": "flake-aspects",
"pushedAt": "2026-03-15T05:33:33Z",
"stargazersCount": 57,
"updatedAt": "2026-03-21T07:36:16Z",
"url": "https://github.com/vic/flake-aspects"
}

Sponsor Vic Dendritic Nix CI Status License

<aspect>.<class> Transposition for Dendritic Nix

Section titled “<aspect>.<class> Transposition for Dendritic Nix”

flake-aspects and vic’s dendritic libs made for you with Love++ and AI—. If you like my work, consider sponsoring

In aspect-oriented Dendritic setups, it is common to expose modules using the structure flake.modules.<class>.<aspect>.

However, for many users, a transposed attribute set, <aspect>.<class>, can be more intuitive. It often feels more natural to nest classes within aspects rather than the other way around.

This project provides a small, dependency-free [transpose]!(nix/default.nix) primitive that is powerful enough to implement [cross-aspect dependencies]!(nix/aspects.nix) for any Nix configuration class. It also includes a [flake-parts module]!(nix/flakeModule.nix) that transforms flake.aspects into flake.modules.

flake.aspects
{
vim-btw = {
nixos = ...;
darwin = ...;
homeManager = ...;
nixvim = ...;
};
tiling-desktop = {
nixos = ...;
darwin = ...;
};
macos-develop = {
darwin = ...;
hjem = ...;
};
}
image flake.modules
{
nixos = {
vim-btw = ...;
tiling-desktop = ...;
};
darwin = {
vim-btw = ...;
tiling-desktop = ...;
macos-develop = ...;
};
homeManager = {
vim-btw = ...;
};
hjem = {
macos-develop = ...;
};
nixvim = {
vim-btw = ...;
};
}

Unlike flake.modules.<class>.<aspect> which is flat, aspects form a tree via provides (alias: _) and a graph via includes.

Also works [without flakes]!(checkmate/modules/tests/without_flakes.nix) via new-scope and lib.evalModules.

Full documentation