tangled
alpha
login
or
join now
oeiuwq.com
/
den
8
fork
atom
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
8
fork
atom
overview
issues
4
pulls
2
pipelines
cybolic test
oeiuwq.com
1 month ago
6ce35e10
3b9867f1
+57
1 changed file
expand all
collapse all
unified
split
templates
ci
modules
features
deadbugs
cybolic-routes.nix
+57
templates/ci/modules/features/deadbugs/cybolic-routes.nix
···
1
1
+
{ denTest, ... }:
2
2
+
{
3
3
+
4
4
+
# See den#165, https://github.com/Cybolic/nix-den-bug-double-import-routes/tree/3cccc7c
5
5
+
flake.tests.deadbugs-cybolic-routes = {
6
6
+
7
7
+
test-has-no-dups = denTest (
8
8
+
{
9
9
+
den,
10
10
+
lib,
11
11
+
tuxHm,
12
12
+
...
13
13
+
}:
14
14
+
{
15
15
+
den.default.homeManager.home.stateVersion = "25.11";
16
16
+
den.hosts.x86_64-linux.igloo.users.tux = { };
17
17
+
18
18
+
den.aspects.routes =
19
19
+
let
20
20
+
inherit (den.lib) parametric;
21
21
+
# eg, `<user>._.<host>` and `<host>._.<user>`
22
22
+
mutual = from: to: den.aspects.${from.aspect}._.${to.aspect} or { };
23
23
+
24
24
+
routes =
25
25
+
{ host, user, ... }@ctx:
26
26
+
parametric.fixedTo ctx {
27
27
+
includes = [
28
28
+
(mutual user host)
29
29
+
(mutual host user)
30
30
+
];
31
31
+
};
32
32
+
in
33
33
+
routes;
34
34
+
35
35
+
den.default.includes = [ den.aspects.routes ];
36
36
+
37
37
+
den.aspects.igloo.provides.tux = den.lib.parametric {
38
38
+
includes = [ den.aspects.testing ];
39
39
+
};
40
40
+
41
41
+
den.aspects.testing =
42
42
+
{ user, ... }:
43
43
+
{
44
44
+
homeManager =
45
45
+
{ pkgs, ... }:
46
46
+
{
47
47
+
home.packages = [ pkgs.vim ];
48
48
+
};
49
49
+
};
50
50
+
51
51
+
expr = lib.filter (lib.hasInfix "vim") (map lib.getName tuxHm.home.packages);
52
52
+
expected = [ "vim" ];
53
53
+
}
54
54
+
);
55
55
+
};
56
56
+
57
57
+
}