In 0fb8e4d I forgot that flake input-following exists. I don't _have_ to
ship nixhelm myself, but I do need to include it so I can stop bundling
data for an oudated AT version.
In fact, I need not bundle _anything_ for the AT library to be useful;
it's better to make the builder's `chart` arg mandatory and let the user
supply their own (usually taken from nixhelm). If they get bored of
supplying the chart to every AT instance they can factor it out,
as I have in my own deployment.
In fact, my deployment relies on the AT library, which I used to provide
as a flake output -- but it didn't make sense to have one version of the
turboprop library available inside service definitions and another
available outside. So I've made the whole library a flake output.
This may bite me in the future.
The documentation for pkgs.lib.lists.unique warned me that the function
is O(n^2). So I conducted some rather unscientific tests using my own
Kubernetes flake and found no noticeable time penalty:
`rm result && nix-collect-garbage -d && nix build` always took
between 37 and 40 seconds, with or without gatherNamespaces.
But, well, n=10.
Also, make more obvious the flaw in mk.namespaces.
If I prefix something with "N.B." it shouldn't be hidden in the code.
It appears that I'm nearly finished with this README.
It's been a very productive session tonight: I fixed a lot of
indefensible architectural choices, simply by tasking myself with
explaining my own code. An invisible rubber duck, if you will.
Sourcehut supports only plaintext and Markdown for READMEs, but I'm
writing reStructuredText for the first time because I figured all
the hyperlinks would make the text nearly impossible to read.
I can publish the README using a build.sr.ht job, `docutils`, and `hut`:
https://git.xenrox.net/~xenrox/custom-readme/tree/1c4ffcd5/item/.build.yml
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.
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.
`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.
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.