summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2021-04-06 16:01:14 +0200
committerJan Tojnar <jtojnar@gmail.com>2021-04-06 16:01:14 +0200
commitc04a14edd6096a2d55d3b62ca182739dac9b7ede (patch)
treefdf08d8db024a987c90a1f48e5d2319ddc7e3c1b /nixos/modules/system
parent44e3fc61fed2ad05cf1ae7d155172dccd0555465 (diff)
parent413e9561f817ae4cbeb870f777ec5a66ab34e76c (diff)
downloadnixpkgs-c04a14edd6096a2d55d3b62ca182739dac9b7ede.tar
nixpkgs-c04a14edd6096a2d55d3b62ca182739dac9b7ede.tar.gz
nixpkgs-c04a14edd6096a2d55d3b62ca182739dac9b7ede.tar.bz2
nixpkgs-c04a14edd6096a2d55d3b62ca182739dac9b7ede.tar.lz
nixpkgs-c04a14edd6096a2d55d3b62ca182739dac9b7ede.tar.xz
nixpkgs-c04a14edd6096a2d55d3b62ca182739dac9b7ede.tar.zst
nixpkgs-c04a14edd6096a2d55d3b62ca182739dac9b7ede.zip
Merge branch 'master' into staging-next
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/systemd.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 03c70102c8c..d4ae4c93468 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -1188,9 +1188,12 @@ in
     systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";
     systemd.services.systemd-random-seed.unitConfig.ConditionVirtualization = "!container";
 
-    boot.kernel.sysctl = mkIf (!cfg.coredump.enable) {
-      "kernel.core_pattern" = "core";
-    };
+    boot.kernel.sysctl."kernel.core_pattern" = mkIf (!cfg.coredump.enable) "core";
+
+    # Increase numeric PID range (set directly instead of copying a one-line file from systemd)
+    # https://github.com/systemd/systemd/pull/12226
+    boot.kernel.sysctl."kernel.pid_max" = mkIf pkgs.stdenv.is64bit (lib.mkDefault 4194304);
+
     boot.kernelParams = optional (!cfg.enableUnifiedCgroupHierarchy) "systemd.unified_cgroup_hierarchy=0";
   };