Skip to content

Commit

Permalink
nixos/systemd: increase default numeric PID range
Browse files Browse the repository at this point in the history
  • Loading branch information
gebner committed Apr 3, 2021
1 parent 3ab6e84 commit c709fd4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions nixos/modules/system/boot/systemd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};

Expand Down

0 comments on commit c709fd4

Please sign in to comment.