!dGrjXvKnCwVLevgmzo:matrix.org

Stockholm NixOS meetup group

51 Members
Monthly meetups in Stockholm, Sweden around Nix releated topics(nixos.org)13 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
21 Oct 2025
@xin:xiny.lixin joined the room.20:40:12
22 Oct 2025
@lillecarl:matrix.orglillecarl"I couldn't sleep" AKA I just implemented running Nix builds in Kubernetes jobs instead of in the DaemonSet. Only partially true because it'll talk to the Nix daemon in the DaemonSet but it can be any node in the cluster, node is selected by label nix.csi/builder but also prioritizes Kubernetes.io/hostname that's the same as the node requesting the build 😄02:51:34
@monotux:socio.topmonotuxwhere do store the artifacts? pvc or s3 or..?08:20:24
@lillecarl:matrix.orglillecarl monotux: The Job reuses the hostPath mount of the CSI (/var/lib/nix-csi/nix) as an optimization, the default labelselector prioritizes building on the node selected to run the pod but if it can't it must go to a binary cache, I didn't finish that bit yet. I did implement an in-cluster cache using openssh and nix-store-ng but the idea is that you'll be able to supply your own build script and upload script along with your own nix.conf to choose where artifacts go yourself so you'll be able to use nix copy, cachix, attic or any other solution (soon ™️) 😄
The initial "paved path" will be the in-cluster nix-store-ng that stores the entire cache on a PVC of your choosing, that bit is implemented within the CSI as an async task running after volume is mounted but I haven't thought made the final decision for where the uploads should happen "in the future". I don't want to upload in the build job since it'll stall volume creation for longer.
The jobs source a build script from a ConfigMap that you can edit, so you can already do the upload in there by overriding the build script to both build and upload 😄
I THINK i'll settle on doing uploads in separate jobs that has the node picked as the same one who ran the build, it's very fast enough to create that run with a scratch image that's already cached and reuse the same hostPath mounted store for that operation too.
10:25:27
@lillecarl:matrix.orglillecarlShort answer: It'll be your choice eventually 😄10:25:41
@monotux:socio.topmonotux I'm still just building locally on each machine like a caveman, I should look into something better for my pi's i 10:28:22
@monotux:socio.topmonotux Last time I needed something robust on a rpi I went with alpine Linux running memory semi-immutable 10:29:13
@lillecarl:matrix.orglillecarlI haven't tried out S3 caching yet but it seems simple enough for a private cache, you set object lifetime to a month and sign the packages before you ship 😄10:33:00
@ahbk:matrix.orgI use NixOS btwYo is it meetup today?10:54:34
@lillecarl:matrix.orglillecarl
In reply to @ahbk:matrix.org
Yo is it meetup today?
Yes!
12:53:30
@ahbk:matrix.orgI use NixOS btwWhen and where?12:54:14
@lillecarl:matrix.orglillecarl@room time for meet-up today, same place, same time [forum post](https://discourse.nixos.org/t/nix-meetup-in-stockholm-sweden/32867/70)! See you there 🤩13:03:21
@lillecarl:matrix.orglillecarl* @room time for meet-up today, same place, same time [forum post](https://discourse.nixos.org/t/nix-meetup-in-stockholm-sweden/32867/70) ! See you there 🤩13:03:43

Show newer messages


Back to Room ListRoom Version: 10