-
-
Notifications
You must be signed in to change notification settings - Fork 43
v0.12.0 #271
-
Den v0.12.0. aka. All Things Must Pass
Where All Things = contexts, aspects and schemas that are now part of custom namespaces and can be passed around between flakes.
This release was about stabilization and performance, moving towards a more stable Den that can actually be used for sharing dendritic aspects across projects.
This paves the road for Den social goals and in particular to enable what is needed for github:vic/denful project in coming weeks.
NOTE Den@0.12.0 requires flake-aspects@0.7.0
What's Changed
All aspects are now parametric {} by default.
This is huge QOL improvement for Den users, previously an aspect foo = { includes = [ x y ]; } was simply an attribute set that knew nothing about propagating context, for that we had to use foo = parametric { ... } so that included aspects were given the correct context.
From now on, all aspects that don't have an explicit functor set by people, are parametric {} by default.
den.base is now den.schema.
See #235
Templates now expose nh-based apps for building hosts/homes.
PR #233
Thanks to Dendritic, you can just copy modules/nh.nix module from them into your projects and it should just work.
New batteries
den._.hostname -- sets the hostName.
den._.mutual-provider -- for one-to-one mutual config contribution between host and user. See the documentation for more on these.
MicroVM template
Our new MicroVM template showcases Den extensibility, custom extensions to den.schema and den.ctx to enable microvm guests nested in microvm hosts.
New Guides: From Zero To Den and From Flake to Den
Available at https://den.oeiuwq.com/guides/from-zero-to-den .
Small Performance Improvements
We had a discussion about Den evaluation time #249, up until now we had done absolutely nothing about performance. As good (lazy) engineer I've delayed thinking about performance until it is actually measurable and actionable.
So I used hyperfine to measure some changes on a couple of places from flake-aspects resolve and Den where I believe we could have improvements. No profiling yet specific functions or zones to see what needs to be changed, I just went to modify what I believed from the top of my head to be quick fixes. I used our own test suite to benchmark changes:
Run comparission 20 runs (10 warmup) of all our CI tests between perf branch and main before it.
perf is: den@dd8fac7355be4cfe7a143bce45cbba3d786d8be1 with flake-aspects@81a51a8997abe392b9d0794424a4823adc9bd3af
main is: den@69682fffa09d57fb8a8dbf367252dbedca023207 with flake-aspects@778d8d7c1352c3b173cdcb9fd0f65acbaf4744a6
hyperfine -m 20 -w 10 -n perf "cd perf && just ci" -n main "cd main && just ci" Benchmark 1: perf Time (mean ± σ): 25.840 s ± 0.931 s [User: 24.157 s, System: 0.670 s] Range (min ... max): 24.236 s ... 27.626 s 20 runs Benchmark 2: main Time (mean ± σ): 39.205 s ± 2.053 s [User: 37.377 s, System: 0.711 s] Range (min ... max): 36.156 s ... 43.566 s 20 runs Summary perf ran 1.52 ± 0.10 times faster than main
Benchmarks are always to be taken with a graint of salt, because specific hardware, and we are talking about Nix (IO intensive) and not the fastest interpreter, I'm using community nix btw. I'm not as focused in lowering these numbers unless we can get some help from people who are actually performance engineers. I'm not.
And this benchmark is not that accurate because perf had additional tests than old main .
Anyways a bit of speed is never bad.
hjem,maid,home-manager have same den.ctx behaviour
Unified how hm-user, hjem-user and maid-user contexts work. This also fixed #254 where den.ctx.hm-user was never being applied. We now have test ensuring that this works also for den.ctx.hjem-user and other home envs. See hjem.nix and others, they are now really simple, people can create their own home environments using den.lib.home-env to integrate other nix libs.
Fixed importing parametric aspects across flakes
This was previously a big limitation that was preventing us to share parametric aspects. We were able to share static ones, but Den is about parametric, so this was really important specially for the Denful project to start. Tests at #259
"From Zero To Den" Fixes
@ulfbayte helped us by following the Zero To Den guide and actually executing each command there and fixing inaccuracies introduced by me while writing and not running stuff :) Thanks to that the guide will be much better for people new to Nix and Den.
Merged Pull-Requests
- host/home apps at flakes/noflake for building with nh by @vic in host/home apps at flakes/noflake for building with nh #233
- rename den.base to den.schema to clarify intention by @vic in rename den.base to den.schema to clarify intention #234
- improve(ci): Semantic PR checks by @vic in improve(ci): Semantic PR checks #237
- feat(battery): New
den._.hostnameand .. by @musjj in feat(battery): Newden._.hostnameand .. #236 - feat(template): MicroVM example integration by @vic in feat(template): MicroVM example integration #240
- fix(battery): den._.hostname strictness by @vic in fix(battery): den._.hostname strictness #244
- feat(docs): New guides from Zero to Den and From Flake to Den by @vic in feat(docs): New guides from Zero to Den and From Flake to Den #247
- feat(ctx): Allow
.intoto be a function to attrs by @vic in feat(ctx): Allow.intoto be a function to attrs #251 - perf(core): Hyperfine benchmark and perf improvements by @vic in perf(core): Hyperfine benchmark and perf improvements #255
- refactor(homes): Make hm,hjem,maid have the same behaviour. by @vic in refactor(homes): Make hm,hjem,maid have the same behaviour. #257
- fix(homes): ctx.hm-user owned config was not being included. by @vic in fix(homes): ctx.hm-user owned config was not being included. #258
- fix(namespaces): test that deeply nested parametric aspects work across flakes by @vic in fix(namespaces): test that deeply nested parametric aspects work across flakes #259
- feat(ctx): Allow transformations into nested contexts by @vic in feat(ctx): Allow transformations into nested contexts #260
- Update home-manager command to specify master branch by @ulfbayte in Update home-manager command to specify master branch #264
- feat(core): Use a parametric default functor by @vic in feat(core): Use a parametric default functor #243
- feat(namespaces): Allow sharing custom ctx and schemas on namespaces by @vic in feat(namespaces): Allow sharing custom ctx and schemas on namespaces #265
- fix(namespaces): Parametric aspect from imported namespace by @vic in fix(namespaces): Parametric aspect from imported namespace #266
- fix(docs): Fix tutorial steps on failure by @ulfbayte in fix(docs): Fix tutorial steps on failure #268
- feat(ci): Add Docs build at CI by @vic in feat(ci): Add Docs build at CI #270
New Contributors
- @ulfbayte made their first contribution in Update home-manager command to specify master branch #264
Full Changelog: v0.11.0...v0.12.0
This discussion was created from the release v0.12.0.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Just updated and it was pleasantly uneventful in the best way! Now I just need to get rid of all those parametrics in my codebase 🤔
Beta Was this translation helpful? Give feedback.