nixos/systemd: add option for cgroup accounting

This commit is contained in:
davidak 2018-03-10 22:23:42 +01:00 committed by Rok Garbas
parent dab9d404ce
commit 41676002b2

View File

@ -524,6 +524,14 @@ in
'';
};
systemd.enableCgroupAccounting = mkOption {
default = false;
type = types.bool;
description = ''
Whether to enable cgroup accounting.
'';
};
systemd.extraConfig = mkOption {
default = "";
type = types.lines;
@ -725,6 +733,13 @@ in
"systemd/system.conf".text = ''
[Manager]
${optionalString config.systemd.enableCgroupAccounting ''
DefaultCPUAccounting=yes
DefaultIOAccounting=yes
DefaultBlockIOAccounting=yes
DefaultMemoryAccounting=yes
DefaultTasksAccounting=yes
''}
${config.systemd.extraConfig}
'';