diff options
author | kalle <kallistoteles@gmail.com> | 2023-11-30 18:23:25 +0100 |
---|---|---|
committer | kalle <kallistoteles@gmail.com> | 2023-12-03 08:45:03 +0100 |
commit | f1e6c6641eaabd157e32ba9ada57363b07daded9 (patch) | |
tree | 981c1e61c11ec87da59d128c66293b434cbbd6e6 /nixos/modules/services/hardware/thinkfan.nix | |
parent | 85306ef2470ba705c97ce72741d56e42d0264015 (diff) | |
download | nixlib-f1e6c6641eaabd157e32ba9ada57363b07daded9.tar nixlib-f1e6c6641eaabd157e32ba9ada57363b07daded9.tar.gz nixlib-f1e6c6641eaabd157e32ba9ada57363b07daded9.tar.bz2 nixlib-f1e6c6641eaabd157e32ba9ada57363b07daded9.tar.lz nixlib-f1e6c6641eaabd157e32ba9ada57363b07daded9.tar.xz nixlib-f1e6c6641eaabd157e32ba9ada57363b07daded9.tar.zst nixlib-f1e6c6641eaabd157e32ba9ada57363b07daded9.zip |
nixos/thinkfan: add setting
the thinkfan service failed from time to time on my t440s, so I added restart on fail to the systemd service.
Diffstat (limited to 'nixos/modules/services/hardware/thinkfan.nix')
-rw-r--r-- | nixos/modules/services/hardware/thinkfan.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix index 8fa7b456f20e..cca35f492b8e 100644 --- a/nixos/modules/services/hardware/thinkfan.nix +++ b/nixos/modules/services/hardware/thinkfan.nix @@ -217,6 +217,8 @@ in { systemd.services = { thinkfan.environment.THINKFAN_ARGS = escapeShellArgs ([ "-c" configFile ] ++ cfg.extraArgs); + thinkfan.serviceConfig.Restart = "on-failure"; + thinkfan.serviceConfig.RestartSec = "30s"; # must be added manually, see issue #81138 thinkfan.wantedBy = [ "multi-user.target" ]; |