nixos/nspawn: cgroupsv2 by default

That way you also get features like cgroup accounting for systemd units
when using systemd-nspawn w/o classic nixos containers.
This commit is contained in:
Maximilian Bosch 2024-06-23 11:46:58 +02:00
parent e2a6227705
commit 749aec8444
No known key found for this signature in database

View File

@ -127,6 +127,9 @@ in {
})
{
systemd.targets.multi-user.wants = [ "machines.target" ];
systemd.services."systemd-nspawn@".environment = {
SYSTEMD_NSPAWN_UNIFIED_HIERARCHY = mkDefault "1";
};
}
];
}