diff options
author | davidak <git@davidak.de> | 2018-03-10 22:23:42 +0100 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2018-03-27 09:15:22 +0200 |
commit | 41676002b28dc0e71306e309c2805438ed256517 (patch) | |
tree | ab9909a24f95de82db495d02fd02fa00166fa6ad /nixos/modules/system/boot/systemd.nix | |
parent | dab9d404ce5814a0d27e347872e0e44f9901b573 (diff) | |
download | nixlib-41676002b28dc0e71306e309c2805438ed256517.tar nixlib-41676002b28dc0e71306e309c2805438ed256517.tar.gz nixlib-41676002b28dc0e71306e309c2805438ed256517.tar.bz2 nixlib-41676002b28dc0e71306e309c2805438ed256517.tar.lz nixlib-41676002b28dc0e71306e309c2805438ed256517.tar.xz nixlib-41676002b28dc0e71306e309c2805438ed256517.tar.zst nixlib-41676002b28dc0e71306e309c2805438ed256517.zip |
nixos/systemd: add option for cgroup accounting
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 92c9ee0c4691..b8a2d42e0fbc 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -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} ''; |