feat: make thinkfan-service-type create /etc/modprobe.d/thinkfan.conf via extending etc-service-type

pull/1/head
anemofilia 2023-09-25 15:36:10 -03:00
parent fa36bf3a64
commit 80552978d5
No known key found for this signature in database
GPG Key ID: 5A8F3D62C87A2B33
1 changed files with 10 additions and 1 deletions

View File

@ -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.")))