mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
nixos/systemd: add option for cgroup accounting
This commit is contained in:
parent
dab9d404ce
commit
41676002b2
@ -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}
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user