Open Gerschtli opened 1 year ago
cg2
sounds like cgroupv2
, and I attribute the whole affair to this function:
https://github.com/NixOS/nix/blob/9dadb5481cdf848c409e6a7e4953acf4861923a5/src/libutil/util.cc#L726
cpu.max
seems to be a CPU consumption throttling knob. Since throttling is transparent to the application subject to it, why would nix want to read it though is beyond me.
Damn, so looks like it is fairly hard to solve. I assume the path /dev/cg2_bpf
is device specific? Or do you get the same? If it is always the same path, we could a fake file for this path.
❯ grep cgroup2 /proc/mounts
none /dev/cg2_bpf cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
No idea. Tried on one of my devices, and it's on /sys/fs/cgroup/
, /sys/fs/cgroup/cpu.max
isn't readable.
I think it might be worth discussing with Nix folks to understand what even is this thing before we take any measures.
I've the same issue on proot-distro alpine (still nix-2.11). Looks like it got fixed on nix-2.12 when I try on archlinux (x86).
You are right, this fixes it:
{
nix.package = pkgs.nixVersions.nix_2_12;
}
You are right, this fixes it:
{ nix.package = pkgs.nixVersions.nix_2_12; }
Where do you insert this line? I tried in nix-on-droid.nix but it gives me an error when I try to build
nix-on-droid.nix is the correct place. Are you using a recent version of the nixos-22.11 channel/flake input? If updating the channel does not help, please post your config, nix-channel --list
(or your flake.nix) and the error.
nix-on-droid.nix is the correct place. Are you using a recent version of the nixos-22.11 channel/flake input? If updating the channel does not help, please post your config,
nix-channel --list
(or your flake.nix) and the error.
I have sorted out this. I didn't need curly brackets.
Not sure what caused this regression, but I get this error on this command (and some other nix commands) on initial bootstrap. It does not occur for nix 2.10.*.