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
1let
2
3 # Example: adds hello into each user. provides only to OS.
4 hello-package-for-user =
5 {
6 user,
7 host,
8 ...
9 }:
10 {
11 ${host.class} =
12 { pkgs, ... }:
13 {
14 users.users.${user.userName}.packages = [ pkgs.hello ];
15 };
16 };
17
18in
19{
20
21 den.default.includes = [ hello-package-for-user ];
22
23 perSystem =
24 {
25 checkCond,
26 rockhopper,
27 lib,
28 ...
29 }:
30 {
31 checks.alice-hello-enabled-by-default = checkCond "added hello at user packages" (
32 let
33 progs = rockhopper.config.users.users.alice.packages;
34 expr = map lib.getName progs;
35 expected = [ "hello" ];
36 in
37 expr == expected
38 );
39 };
40
41}