From 80552978d5dc7108a971dab436476e77c7f306c4 Mon Sep 17 00:00:00 2001 From: anemofilia Date: Mon, 25 Sep 2023 15:36:10 -0300 Subject: [PATCH] feat: make thinkfan-service-type create /etc/modprobe.d/thinkfan.conf via extending etc-service-type --- modules/radix/services/linux.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/radix/services/linux.scm b/modules/radix/services/linux.scm index ccd4e68..1bcd236 100644 --- a/modules/radix/services/linux.scm +++ b/modules/radix/services/linux.scm @@ -53,12 +53,21 @@ (one-shot? #t) (respawn? respawn?))))) +(define thinkfan-modprobe-config + (plain-file "thinkfan.conf" + "options thinkpad_acpi experimental=1 fan_control=1")) + +(define thinkfan-modprobe-etc-service + `(("modprobe.d/thinkfan.conf" ,thinkfan-modprobe-config))) + (define thinkfan-service-type (service-type (name 'thinkfan) (extensions (list (service-extension shepherd-root-service-type - thinkfan-shepherd-service))) + thinkfan-shepherd-service)) + (service-extension etc-service-type + thinkfan-modprobe-etc-service)) (default-value (thinkfan-configuration)) (description "Adjust fan level according to configured temperature limits.")))