tangled
alpha
login
or
join now
oeiuwq.com
/
flake-aspects
2
fork
atom
fake.modules transposition for aspect-oriented Dendritic Nix. with cross-aspect dependencies. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/
dendrix.oeiuwq.com/Dendritic.html
dendritic
nix
aspect
oriented
2
fork
atom
overview
issues
1
pulls
pipelines
use providerType in aspects
oeiuwq.com
3 months ago
1e2113f1
b081123b
+3
-9
1 changed file
expand all
collapse all
unified
split
nix
types.nix
+3
-9
nix/types.nix
···
5
5
aspectsType = lib.types.submodule (
6
6
{ config, ... }:
7
7
{
8
8
-
freeformType = lib.types.attrsOf (lib.types.either aspectSubmoduleAttrs providerType);
8
8
+
freeformType = lib.types.attrsOf providerType;
9
9
config._module.args.aspects = config;
10
10
}
11
11
);
···
30
30
);
31
31
32
32
functionProviderType = lib.types.either functionToAspect (lib.types.functionTo providerType);
33
33
-
providerType = lib.types.either functionProviderType aspectSubmodule;
33
33
+
providerType = lib.types.either aspectSubmoduleAttrs functionProviderType;
34
34
35
35
aspectSubmoduleAttrs = lib.types.addCheck aspectSubmodule (
36
36
m: (!builtins.isFunction m) || (isAspectSubmoduleFn m)
···
78
78
options.provides = lib.mkOption {
79
79
description = "Providers of aspect for other aspects";
80
80
default = { };
81
81
-
type = lib.types.submodule (
82
82
-
{ config, ... }:
83
83
-
{
84
84
-
freeformType = lib.types.attrsOf providerType;
85
85
-
config._module.args.provides = config;
86
86
-
}
87
87
-
);
81
81
+
type = aspectsType;
88
82
};
89
83
options.__functor = lib.mkOption {
90
84
internal = true;