Kākāpō – A web bundler for Nix strings with context
github.com
github.com
I've got my 2 personal machines as well as my homelab and a few other appliances all running off of it now.
I would happily adopt it as a build and deploy system if the UX was improved, but I currently hesitate to recommend it to my teammates because of its rough edges and steep learning curve.
As is, Nix isn't actually hard if people learn how to learn. I see coworkers have trouble with it but don't even know how to use the repl to debug. I always debug their issues in an instant.
So docs and education would be my focus.
The goal is to create tools using Nix to make it easy to deploy applications on a server.
----
So far the project can:
- Create docker-compose files that: deploy a `Caddy` server & server applications in a reverse proxy through the Docker bridge network.
---- This way Caddy & Let's Encrypt takes care of TSL certificates, while thanks to Nix & Docker we simply need to create docker-compose files. (for an easy deployment)
- Deploy a `paperless-ngx` application that backups files using `borgbackup` & sends an error email when the backup fails.
----
Next week I plan to add:
- A Nix generated `cloud-init.yaml` file to make it easy to initialize & setup new servers (for easy & quick deployment of applications that need to run on additional servers).
----
Examples:
- Deploying a "hello-test-app": https://github.com/kish10/nix-server-tools/blob/main/reverse...
- Deploying a "hello-test-app" & "paperless-ngx -- with borgbackup & error emails": https://github.com/kish10/nix-server-tools/blob/main/reverse...
----
I just started open sourcing the code this week, so there isn't a lot of documentation & examples.
I could definitely use feedback & contributions, so I'd appreciate it if you would take a look.
I can envision some applications for distributing packages for non-nix systems while still relying on nix to build them.
The flake schema has a "bundler" output that can point to an executable like this to bundle a flake's outputs for any supported target. Not sure about the state of the art, though.
https://github.com/3noch/nix-bundle-exe
I've never tried it out though.
Neither supports non-absolute paths which is the crux of the issue.
That being said I've long suspected there is a happy middle ground where you hack at the problem from both sides. On one side you provide F(x) -> x' where x is an absolute path closure and x' is a relative path closure, for any supported subgraphs in the build graph. Then, for the rest, you rebuild from source using any transformed inputs you can. In other words, when you're evaluating x', if you have x in a cache already, and you can rewrite it, do so. If not, just build it from scratch.
The problem is at some point you have to prove that both methods of producing x' result in the same exact output. This is not easy! However you can possibly prove it for any arbitrary closure by simply round tripping. For example, assuming the transform F(x) -> x' is cheap, and at some point you build x, which is almost guaranteed, then allow x'' == x and when you build x just try and retarget it anywhere, and then back again.
This doesn't prove it actually works, but might prove that it's correct, which is acceptable to me. I haven't got far enough to try this out yet, of course. Be my guest!
I saw this is already a Github issue for this project - but use of a Māori bird name is considered tapu (holy or sacred) to Māori.
Hopefully that doesn't distract from the project, the developer should probably consider the implications of choosing such a name (it may look like cultural appropriation).
Kia ora!
| If using a Māori cultural element, it is essential that you create a cultural narrative around your brand or product including the usage, your thinking and where you gained inspiration from. In Māori culture this is called ‘whakapapa’. Everything in the Māori world has whakapapa. It is also your first line of defense if someone accuses you of cultural appropriation.
Te Reo names are often gifted by Iwis or individuals with sufficient Mana. As a Tangata Whenua Inia, I was strongly recommended to avoid using Te Reo names in business due to cultural reasons.
And getting precious over a word is ridiculous, it seemed to be a common theme growing up in NZ, there's a general apathy until there's some perceived benefit and then suddenly it's about race and culture.
They blame an outdated copyright system.
Given how long treat claims have been going on for, I’ve little sympathy for such perspectives. Get it in law, or leave it be. Don’t try guilt trip others over concepts that don’t exist outside Maoridom - like mana.
Seriously its threads like this that do nothing but reinforce negative connotations of Maori. It would have been better to race relations to not mention it.
Or not seeing many Maori in language classes cause they weren't interested but I was required to attend (opt out, but I wanted to learn a bit of Maori).
Respect is earned and I think active and friendly participation in their own culture would help foster the partnership you talk about. But growing up most of what I saw was selective participation.
Work will never be same (developers on my team love to use it in slack reactions)
If you’re interested, try the audiobook. It’s narrated by Adam’s himself.
Upvoted for the name, from Kiwiland myself :)