diff options
author | Shea Levy <shea@shealevy.com> | 2018-03-28 09:36:47 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-03-28 09:36:47 -0400 |
commit | 05e375d7103ac51e2da917965c37246c99f1ae4f (patch) | |
tree | 7ec4e9a2f5b7b1e2dea7c3e059f5b40e1dac1569 /nixos/modules/system | |
parent | 335934a073d6024d54c71bf82d5f8baab13abe75 (diff) | |
parent | c7d7abc51e5f9b9c7481a83c47b37508bf08b05b (diff) | |
download | nixlib-05e375d7103ac51e2da917965c37246c99f1ae4f.tar nixlib-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.gz nixlib-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.bz2 nixlib-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.lz nixlib-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.xz nixlib-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.zst nixlib-05e375d7103ac51e2da917965c37246c99f1ae4f.zip |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/kexec.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/kexec.nix b/nixos/modules/system/boot/kexec.nix index 14ebe66e6320..3fc1af28f628 100644 --- a/nixos/modules/system/boot/kexec.nix +++ b/nixos/modules/system/boot/kexec.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, ... }: { - config = lib.mkIf (pkgs.kexectools != null) { + config = lib.mkIf (pkgs.kexectools.meta.available) { environment.systemPackages = [ pkgs.kexectools ]; systemd.services."prepare-kexec" = diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 2391e85f9f74..bd2d52c30b4b 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -523,6 +523,14 @@ in ''; }; + systemd.enableCgroupAccounting = mkOption { + default = false; + type = types.bool; + description = '' + Whether to enable cgroup accounting. + ''; + }; + systemd.extraConfig = mkOption { default = ""; type = types.lines; @@ -724,6 +732,13 @@ in "systemd/system.conf".text = '' [Manager] + ${optionalString config.systemd.enableCgroupAccounting '' + DefaultCPUAccounting=yes + DefaultIOAccounting=yes + DefaultBlockIOAccounting=yes + DefaultMemoryAccounting=yes + DefaultTasksAccounting=yes + ''} ${config.systemd.extraConfig} ''; |