| 2 May 2022 |
Wanja Hentze | Would you accept a PR to that effect, or do you prefer to do this yourself? | 13:13:52 |
David Arnold (blaggacao) | Zhaofeng Li: I added a harvester: https://github.com/divnix/std/issues/60#issue-1223217085 for easier compat. But it still wouldn't accept to be system-neutral. That mapping is just too complicated. | 18:43:27 |
| 6 May 2022 |
| Jeff joined the room. | 04:36:25 |
| 7 May 2022 |
| dantefromhell joined the room. | 00:45:18 |
dantefromhell | Hi,
I just stumbled over colmena when research tools to deploy Nix from flakes onto a variety of machines (laptop, VMs, servers, Raspberry).
One thing I couldnt figure out though if it's possible to automate the initial nix install (incl partitioning) with colmena? | 00:49:28 |
CRTified | AFAIK no | 00:49:48 |
Chinchilla Washington | In reply to @dantefromhell:matrix.org
Hi, I just stumbled over colmena when research tools to deploy Nix from flakes onto a variety of machines (laptop, VMs, servers, Raspberry).
One thing I couldnt figure out though if it's possible to automate the initial nix install (incl partitioning) with colmena? Check out nixos-up https://github.com/samuela/nixos-up | 01:05:50 |
Zhaofeng Li | In reply to @dantefromhell:matrix.org Hi, I just stumbled over colmena when research tools to deploy Nix from flakes onto a variety of machines (laptop, VMs, servers, Raspberry).
One thing I couldnt figure out though if it's possible to automate the initial nix install (incl partitioning) with colmena? Colmena only deploys to existing NixOS hosts and doesn't take care of the initial install. To install onto bare-metal hosts, I've been using this external script to replace nixos-install to deploy from a Colmena config: https://github.com/zhaofengli/colmena/issues/42#issuecomment-1004528027 | 01:14:45 |
Zhaofeng Li | You can probably pair it with systemd-repart to take care of partitioning as well. | 01:15:44 |
Zhaofeng Li | Wanja Hentze: Somehow I didn't get notified of this message. If you are interested in doing that, please send a PR! | 01:17:22 |
dantefromhell | yeah I feel there's this recursive dependency on nix all over the nix ecosystem 🤯🤮 | 01:25:48 |
CRTified | In reply to @dantefromhell:matrix.org Hi, I just stumbled over colmena when research tools to deploy Nix from flakes onto a variety of machines (laptop, VMs, servers, Raspberry).
One thing I couldnt figure out though if it's possible to automate the initial nix install (incl partitioning) with colmena? For systems which you provision externally ("dd a ready-to-go-image on an sd-card", you could also define your config while importing sd-image-aarch64.nix from nixpkgs. Then, you could build the config.system.build.sdImage-attribute and use the resulting image on your device 🙂 | 02:03:26 |
CRTified | at least for the sd-card, this would also include partitioning | 02:04:00 |
David Arnold (blaggacao) | Zhaofeng Li: I recently had a chat with Rom Garbas who mentioned that nix might have a builtin nix apply in stock that would make the part of colmena's current eval.nix and similar techniques, but I'd assume with better eval cache properties. Currently that facility is not really exposed, but it's what used for nix bundle. We should sharpen our intelligence on this and prepare for it. | 02:28:00 |
David Arnold (blaggacao) | Maybe we can even ask for exposure of said nix apply | 02:28:24 |
David Arnold (blaggacao) | * Zhaofeng Li: I recently had a chat with Rok Garbas who mentioned that nix might have a builtin `nix apply` in stock that would make the part of colmena's current `eval.nix` and similar techniques, but I'd assume with better eval cache properties. Currently that facility is not really exposed, but it's what used for `nix bundle`. We should sharpen our intelligence on this and prepare for it. | 02:28:43 |
Zhaofeng Li | Any links to docs on this nix apply? | 02:29:50 |
David Arnold (blaggacao) | Afaic, it's not exposed anywhere yet. I can ask for more details next week. | 02:32:48 |
David Arnold (blaggacao) | I assume the main benefit is that the cache integrity of the flake is not destroyed. | 02:33:09 |
David Arnold (blaggacao) | Ot came up during a discussion about nix-eval-cavhe. | 02:33:22 |
David Arnold (blaggacao) | * Ot came up during a discussion about nix-eval-cache. | 02:33:31 |
David Arnold (blaggacao) | Maybe this? https://github.com/NixOS/nix/blob/master/src/nix/bundle.cc#L78 | 02:37:29 |
David Arnold (blaggacao) | Anyway, the design pattern is pretty similar / the same. | 02:38:03 |
Zhaofeng Li | Taking a look in a bit, thanks 👍 | 02:44:01 |
David Arnold (blaggacao) | Looks like that is the function, the counterpart is pretty simple: https://github.com/NixOS/bundlers/blob/master/flake.nix | 02:48:42 |
David Arnold (blaggacao) | So in essence, one flake.is "wrapped around" the other. | 02:49:00 |
David Arnold (blaggacao) | * So in essence, one flake is "wrapped around" the other. | 02:49:10 |
David Arnold (blaggacao) | You could also think of it in terms of 'passing arguments to flakes'. | 02:49:37 |
David Arnold (blaggacao) | Or 'flake inheritence' | 02:49:51 |
dantefromhell | CRTified: The downside is this woukd only work with raspberrys plus I dont use the SD-Cards (long term reliability) since USB boot is now possible. | 10:41:56 |