From fe58dc6cdd0fb8566e4a1083b0896f6ea6a7d343 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 27 Sep 2021 22:23:28 +0200 Subject: [PATCH] dacbert, radiobert: globalize systemd.watchdog configuration --- hosts/dacbert/default.nix | 6 ------ hosts/radiobert/default.nix | 6 ------ lib/default.nix | 7 +++++++ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/hosts/dacbert/default.nix b/hosts/dacbert/default.nix index 9fbb4dee..12c3f851 100644 --- a/hosts/dacbert/default.nix +++ b/hosts/dacbert/default.nix @@ -103,12 +103,6 @@ extraGroups = [ "wheel" "audio" ]; }; - # Reboot on hang - systemd.watchdog = { - runtimeTime = "10s"; - rebootTime = "15s"; - }; - hardware.pulseaudio = { enable = true; systemWide = true; diff --git a/hosts/radiobert/default.nix b/hosts/radiobert/default.nix index 297e0d3c..52cd9e92 100644 --- a/hosts/radiobert/default.nix +++ b/hosts/radiobert/default.nix @@ -159,12 +159,6 @@ SUBSYSTEM=="usb", MODE:="0666" ''; - # Reboot on hang - systemd.watchdog = { - runtimeTime = "10s"; - rebootTime = "15s"; - }; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/lib/default.nix b/lib/default.nix index 3c494478..8d46a5d1 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -251,6 +251,13 @@ in { ''; time.timeZone = lib.mkDefault "Europe/Berlin"; + + # Reboot on hang + systemd.watchdog = lib.mkIf (!config.boot.isContainer) { + runtimeTime = "10s"; + rebootTime = "15s"; + }; + }; meta.maintainers = with lib.maintainers; [ ehmry ];