Skip to content

Commit

Permalink
Merge pull request #288 from barrucadu/panic
Browse files Browse the repository at this point in the history
Reboot on panic, oops, and zfs "panic"
  • Loading branch information
barrucadu authored Jun 6, 2024
2 parents 3fc9b15 + 92258d8 commit 0552e14
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions shared/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ in
system.autoUpgrade.flake = "/etc/nixos";
system.autoUpgrade.dates = "06:45";

# Reboot on panic and oops
# https://utcc.utoronto.ca/~cks/space/blog/linux/RebootOnPanicSettings
boot.kernel.sysctl = {
"kernel.panic" = 10;
"kernel.panic_on_oops" = 1;
};

#############################################################################
## Locale
#############################################################################
Expand Down Expand Up @@ -151,6 +158,12 @@ in
''
];

# Actually panic when ZFS "panics"
# https://utcc.utoronto.ca/~cks/space/blog/linux/ZFSPanicsNotKernelPanics
boot.extraModprobeConfig = mkIf thereAreZfsFilesystems ''
options spl spl_panic_halt=1
'';

#############################################################################
## Services
#############################################################################
Expand Down

0 comments on commit 0552e14

Please sign in to comment.