I’m getting this error Refusing to run under cgroup v1, SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1 not specified on kernel command line at boot after update on latest nixos-unstable. From what I can see this is very likely because of a systemd update, not a kernel update.
If I do as told and I add boot.kernelParams = [ "SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1" ]; to my config (which, by the way, it didn’t even show me the entire message on the screen, I had to search for it to realise what I had to do) the system boots normally but it boots much slower than it does usually.
So why am I getting this? I don’t even use cgroups at all, so it must be something else Nix is doing.
My config is here. Sorry in advance for my custom modules.
I think that NixOS is (idk) utilizing cgroups internally even if not set. if you run systemd-cgls you can see the control groups. NixOS has shifted to a newer version of systemd which enforces cgroup v2 so
the reason the boot is slower is because you enabled compatibility which can slow down the process.
Just realised what’s going on, I have ananicy enabled in my config. That uses cgroups. Disabling it and the kernel parameter makes everything work normally. I’ll make an issue on nixpkgs too about this, maybe even on ananicy-cpp itself too.
I have just now run into it as well. I had "systemd.unified_cgroup_hierarchy=false" in boot.kernelParams which was a workaround required for nvidia-docker.