From b58b9b18448d941fcf628ca5bc75ea501a592928 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= <lelgenio@disroot.org>
Date: Wed, 8 Jan 2025 21:20:45 -0300
Subject: [PATCH] amdgpu: always restart the fan control script

---
 hosts/monolith/amdgpu.nix | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix
index ac09b48..4c26afa 100644
--- a/hosts/monolith/amdgpu.nix
+++ b/hosts/monolith/amdgpu.nix
@@ -21,6 +21,10 @@ in
     script = ''
       ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85
     '';
+    serviceConfig = {
+      Restart = "always";
+      RestartSec = 10;
+    };
     wantedBy = [ "multi-user.target" ];
   };