1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-14 11:37:37 +00:00
Commit graph

244 commits

Author SHA1 Message Date
Antonio Gurgel
a4ace6bfc4 Add nsMetadata example to template 2023-12-06 00:00:36 -08:00
Antonio Gurgel
a6ab0c6960 Allow fetchers to be used as builders
Another interface oddity cut down. I shouldn't have to make
two derivations (lib.builders.derivation) for one file.
2023-12-06 00:00:05 -08:00
Antonio Gurgel
2e742a7f9b Export templates outside eachDefaultSystem 2023-12-05 23:30:54 -08:00
Antonio Gurgel
71837dd81b Document mkCharts*; receive nixhelm for mkCWNH
Easier than telling users to input nixhelm into their own flakes
and set `inputs.turboprop.inputs.nixhelm.follows`.
2023-12-05 23:25:35 -08:00
Antonio Gurgel
44cb55820a Better illustrate API ordering failure 2023-12-05 23:06:34 -08:00
Antonio Gurgel
f3f44c18ea Pass name and namespaces into modules
module.args still needs them for the builder, but I can finally put to
rest the doubts I had about writing things like `name = "breezewiki";`
in a module into which I could damn well pass that variable.
2023-12-05 22:46:47 -08:00
Antonio Gurgel
9e7bac64c8 Move app-template back to lib
This interface was getting ridiculous.

`app-template` gets released infrequently enough that keeping a static
`chart.nix` is a small tradeoff for the previous lunacy of passing a
whole derivation tree in through the flake.
2023-12-05 22:46:47 -08:00
Antonio Gurgel
805b8a1b74 Pare down example flake; document mkDerivation
`mkDerivation` doesn't have to be assigned beforehand; it can just be
passed two attrsets. I only realized this after writing out its
signature in the documentation.

Also, the example flake in the documentation doesn't use nixpkgs,
so I removed it.
2023-12-05 22:03:23 -08:00
Antonio Gurgel
2a49818159 Add quick-start section to README; tweak sentences 2023-12-05 21:35:54 -08:00
Antonio Gurgel
a942a8690b Explain service ordering; fix template accordingly 2023-12-04 23:15:38 -08:00
Antonio Gurgel
a32b24c69a Lift only modules named default
Otherwise `services/default` obliterates everything at its level.
2023-12-04 22:57:52 -08:00
Antonio Gurgel
b59c8670d2 Fix mk.namespaces bug: allow DEFAULT to be unset 2023-12-04 22:57:52 -08:00
Antonio Gurgel
a052d499df Continue writing README; add template 2023-12-04 22:57:52 -08:00
Antonio Gurgel
34e00f2b30 Fix bug in app-template.build
It was never passing `kubeVersion` on to the builder.
2023-12-04 21:31:29 -08:00
Antonio Gurgel
d9ab890072 Format
I need a pre-commit hook...
2023-12-04 19:39:28 -08:00
Antonio Gurgel
1d8bee8fe3 Clean up mk.namespaces 2023-12-04 19:37:57 -08:00
Antonio Gurgel
7c0b843315 Move kubeV to loader; allow user to set apiV
It doesn't make sense for `kubeVersions` to be an _input_ to the module,
i.e., one provided by the Haumea loader. Let it be passed inside the
foldler instead, like `apiVersions`.

En passant, I realized it's as easy to expose apiVersions to user input;
maybe one'd want to specify APIs not installed by this flake.
2023-12-04 19:34:22 -08:00
Antonio Gurgel
964a2d115e Chop up README
Half of it no longer applies.
2023-12-04 00:04:58 -08:00
Antonio Gurgel
4480806390 Rename src/builders
To avoid confusion with lib/builders.
2023-12-04 00:04:58 -08:00
Antonio Gurgel
a3856bc9cc Attempt to document mkServices better 2023-12-03 23:57:48 -08:00
Antonio Gurgel
368a4ae7ed rm Makefile
Useful only in the `kubernetes` flake.
2023-12-03 23:50:57 -08:00
Antonio Gurgel
e788ab24a8 rm ADRs
They were good enough for corralling my disorganized thoughts,
but they hardly rise to the quality befitting their name.

Comments and documentation will suffice.
2023-12-03 23:38:32 -08:00
Antonio Gurgel
b9f28e8a70 Fix typos 2023-12-03 23:11:03 -08:00
Antonio Gurgel
5b1984ccf6 Restore flake output.lib
By more granularly exporting `mkDerivation` I get rid of the catch-22
mentioned in the comments.
2023-12-03 23:05:42 -08:00
Antonio Gurgel
0f7f384137 Create mkChartsWithNixhelm; export appT 2023-12-03 23:03:36 -08:00
Antonio Gurgel
3a6246ab83 Final refactor
Make flake importable at top level.
Move app-template to `./src`, removing `charts` from `./lib`.
Clean up unused bits elsewhere.
2023-12-03 21:45:40 -08:00
Antonio Gurgel
6907ae7373 Clean up 2023-12-03 21:29:15 -08:00
Antonio Gurgel
fdb3f5b2e6 Fix last bugs
At this commit, my test package finally builds.
2023-12-03 21:05:15 -08:00
Antonio Gurgel
af56c2be50 Truck in namespaces 2023-12-03 20:54:47 -08:00
Antonio Gurgel
8e9650158a Move mk[^D]* to flake-builders; finish mkDerivation 2023-12-03 20:46:57 -08:00
Antonio Gurgel
ffd9d39c8f Fix subtle mistakes
Wrong check for module-has-extraObjects. `module ? extra` is always
true and leads to failure when evaulating `module.extra.outPath`.

I also missed an `inherit apiVersions` and had to retrofit the
accumulator to include debug output to find that out.
2023-12-03 20:28:24 -08:00
Antonio Gurgel
ec3276b493 Truck in user data from own flake
Same rationale as 0790be8.
2023-12-03 20:03:13 -08:00
Antonio Gurgel
97dbdec7f7 Re-implement service-builder
`apiVersions` gave me a headache while writing the foldl so I made it
a separate input.

Now the service modules have this signature, without my having to
change any code in the modules themselves:

{charts, etc, ...} -> [apiVersion] -> {out, extra}
2023-12-03 19:58:28 -08:00
Antonio Gurgel
6b97777fe9 Typo 2023-12-03 18:02:47 -08:00
Antonio Gurgel
0790be8f8c Add service tree
Easier to test here than across flakes.
2023-12-03 18:01:38 -08:00
Antonio Gurgel
b92b4400bb Rid self of flotsam in flake-builders
I'll rethink `paths`.
2023-12-03 18:01:19 -08:00
Antonio Gurgel
6bbd867da3 Experimentally implement mkStages 2023-12-03 18:01:06 -08:00
Antonio Gurgel
1bde5552c5 In ADRs, document assumptions and fix typos 2023-12-03 18:00:15 -08:00
Antonio Gurgel
797ae401ae Truck in haumea 2023-12-03 17:07:21 -08:00
Antonio Gurgel
293032ddee Reimagine flakeBuilders.paths 2023-12-03 13:51:05 -08:00
Antonio Gurgel
dda6ce376f Write ADR 2 2023-12-03 13:50:44 -08:00
Antonio Gurgel
2ad1ad92cd Fix service paths 2023-12-03 09:36:17 -08:00
Antonio Gurgel
70fae512d1 Refactor crisis
Two imperfections have come to bite me simultaneously:
- I wanted strict ordering of services but implemented it very sloppily.
- The flake builders represent implementation leakage. I want to present
  a clean interface to users, not "first, you must evaluate these
  twenty-eight variables".

So now I'm fixing too many things at once. Luckily it's hard to lose
things in Git.
2023-11-29 23:06:13 -08:00
Antonio Gurgel
a43c3c1a62 WORDS 2023-11-29 00:10:40 -08:00
Antonio Gurgel
2da1ed3578 Document fetchers and builders 2023-11-28 23:28:21 -08:00
Antonio Gurgel
32e3576ea0 Words words words words 2023-11-28 22:08:54 -08:00
Antonio Gurgel
92fba41caf Write about trees 2023-11-28 22:08:54 -08:00
Antonio Gurgel
f9683b4411 Convert to RST and significantly expand 2023-11-28 22:08:54 -08:00
Antonio Gurgel
ce881f0c0d Keep writing 2023-11-28 22:08:54 -08:00
Antonio Gurgel
4decddde92 Start writing README 2023-11-28 22:08:54 -08:00