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

cybolic test

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