guix: add rottlog, thermald, tlp, and powertop to chaman
[~bandali/configs] / .config / guix / system / chaman.scm
index 6a359fb..4e016f5 100644 (file)
@@ -1,5 +1,6 @@
-(use-modules (gnu))
-(use-service-modules desktop networking ssh xorg)
+(use-modules (gnu)
+             (gnu packages linux))      ; for powertop
+(use-service-modules admin desktop mail networking pm ssh xorg)
 
 (operating-system
  (host-name "chaman")
    (set-xorg-configuration
     (xorg-configuration
      (keyboard-layout keyboard-layout)))
+   (dovecot-service
+    #:config
+    (dovecot-configuration
+     ;; (log-path "/dev/stderr")
+     (protocols (list (protocol-configuration
+                       (name "imap"))))
+     (ssl? "no")
+     (listen '("127.0.0.1"))
+     (disable-plaintext-auth? #f)
+     (auth-mechanisms '("plain"))
+     (postmaster-address "mab@gnu.local")
+     (mail-location "maildir:/home/mab/mail/%d/%n/mail")
+     (userdbs (list (userdb-configuration
+                     (driver "static")
+                     (args (list "uid=mab" "gid=users" "home=/home/mab/mail/%d/%n")))))
+     (passdbs (list (passdb-configuration
+                     (driver "passwd-file")
+                     (args (list "/data/dovecot-passwd")))))))
+   (service rottlog-service-type)
+   (service thermald-service-type)
+   (service tlp-service-type
+            (tlp-configuration
+             (cpu-boost-on-ac? #t)
+             (sound-power-save-on-bat 0)
+             (sound-power-save-controller? #f)
+             ;; (usb-blacklist "0e8f:00a8") ;for some reason doesn't seem to work
+             (usb-autosuspend? #f)))
+   (simple-service 'my-powertop-auto-tune activation-service-type
+                   #~(zero? (system* #$(file-append powertop "/sbin/powertop")
+                                     "--auto-tune")))
    %desktop-services)))