Repository navigation
Description
Summary
With the v0.4.2 release deployment YAML, CSI volumes that require a local build (not just substitution), e.g. volumeAttributes.nixExpr, fail. In the nix-node pod, the nixbld group exists but there are no nixbld* users, so Nix cannot allocate build users.
This blocks workflows like using nixExpr to assemble a directory tree. In contrast, mounting a cached flakeRef can succeed.
Environment
• nix-csi: v0.4.2
• Installed via: https://github.com/Lillecarl/nix-csi/releases/download/v0.4.2/nix-csi-deployment.yaml
• Kubernetes: Kind v1.35.0
• Node pod: DaemonSet/nix-node (running)
Steps to reproduce
-
Deploy nix-csi using the release YAML.
-
Create a Job/Pod that uses a nixExpr volume, e.g.:
1 │apiVersion: batch/v1 2 │kind: Job 3 │metadata: 4 │ name: nix-csi-nixexpr-demo 5 │spec: 6 │ template: 7 │ spec: 8 │ restartPolicy: Never 9 │ containers: 10 │ - name: test 11 │ image: busybox:1.36.1 12 │ command: ["sh","-euxc","cat /nix/var/result/ok"] 13 │ volumeMounts: 14 │ - name: nix 15 │ mountPath: /nix 16 │ subPath: nix 17 │ readOnly: true 18 │ volumes: 19 │ - name: nix 20 │ csi: 21 │ driver: nix.csi.store 22 │ readOnly: true 23 │ volumeAttributes: 24 │ nixExpr: | 25 │ let 26 │ nixpkgs = builtins.fetchTree { 27 │ type = "github"; 28 │ owner = "NixOS"; 29 │ repo = "nixpkgs"; 30 │ ref = "nixos-unstable"; 31 │ }; 32 │ pkgs = import nixpkgs { system = builtins.currentSystem; }; 33 │ in 34 │ pkgs.runCommand "demo" { } '' 35 │ mkdir -p $out 36 │ echo ok > $out/ok 37 │ '' -
Observe the workload pod stuck in ContainerCreating with mount failures.
Actual result
• Kubelet shows FailedMount with an internal error like “Failed to build Nix expression”.
• On the nix-csi node pod logs you see the build failing; and inside the nix-node container:
1 │getent group nixbld
2 │# nixbld exists
3 │
4 │getent passwd nixbld1
5 │# no such user
(Previously we’ve also seen the canonical Nix error: “the build users group 'nixbld' has no members”.)
Expected result
nixExpr builds should work out of the box with the release YAML.
Workaround
Manually create nixbld1..nixbld32 users and add them as members of the nixbld group inside the running nix-node pod (not persistent).
Activity
test building in ci with hello-unfree
Lillecarl commentedon Feb 18, 2026
Thanks for reporting! I've replaced hello with hello-unfree (which isn't cached) in the "test suite" which should catch this error.
I believe the error comes from the upgrade from Lix 2.93 to 2.94 where auto-allocate-uuids became tied to experimental feature cgroups (which we can't use until KEP-5474 is in all supported Kubernetes releases). It'll be good to have the CI test building and not just substitution, that's lazy on my end.
https://github.com/Lillecarl/nix-csi/actions/runs/22121564014 <- workflow will verify the issue.
I'll look further into this tomorrow, it's 01:39 and I'm waking up at 06:15 😢
test building in ci with hello-unfree
add users nixbld1-32, fixes #4
add users nixbld1-32, fixes #4
test building in ci with hello-unfree
add users nixbld1-32, fixes #4
Lillecarl commentedon Feb 18, 2026
There we go!
If you're wondering about the force-pushes, I'm developing with jujutsu vcs, develop branch can have its history rewritten at-will.
You can deploy the latest manifest by checking out develop and running
kubectl apply -f $(nix build --no-link --print-out-paths --file . kubenixApply.manifestYAMLFile)(Beware of spelling errors, writing this on the phone)
I'll release later today when I get home, thanks again for the reports! 😄
thorstenweber83 commentedon Feb 18, 2026
I can confirm that it works now. Thank you!
Lillecarl commentedon Feb 19, 2026
Thanks! I've released 0.4.3 so there are updated manifests on GitHub
pynixd: collect and optimise an overlay store through its upper layer
pynixd: read a .drv with the checks and errors of Nix master