aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/system/boot/systemd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r--nixos/modules/system/boot/systemd.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index c22264b3e92d..cbf9e7b49d36 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -550,6 +550,14 @@ in
'';
};
+ systemd.enableUnifiedCgroupHierarchy = mkOption {
+ default = true;
+ type = types.bool;
+ description = ''
+ Whether to enable the unified cgroup hierarchy (cgroupsv2).
+ '';
+ };
+
systemd.coredump.enable = mkOption {
default = true;
type = types.bool;
@@ -1178,6 +1186,7 @@ in
boot.kernel.sysctl = mkIf (!cfg.coredump.enable) {
"kernel.core_pattern" = "core";
};
+ boot.kernelParams = optional (!cfg.enableUnifiedCgroupHierarchy) "systemd.unified_cgroup_hierarchy=0";
};
# FIXME: Remove these eventually.