diff --git a/system/linux/system.nix b/system/linux/system.nix index d186d43..90cfa32 100644 --- a/system/linux/system.nix +++ b/system/linux/system.nix @@ -12,4 +12,14 @@ # Disable coredumps to prevent filling up /var/lib/systemd/coredump/ # Coredumps can quickly consume large amounts of disk space systemd.coredump.enable = false; + + # Disable core dumps. + security.pam.loginLimits = [ + { domain = "*"; item = "core"; type = "hard"; value = "0"; } + ]; + + # Don't shutdown when power button is short-pressed. + services.logind.extraConfig = '' + HandlePowerKey=ignore + ''; }