about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorGuy Boldon <gb@guyboldon.com>2024-02-11 21:17:19 +0100
committerGuy Boldon <gb@guyboldon.com>2024-02-16 19:16:24 +0100
commit0824756d056e91cf1c40523877449a698ad71b77 (patch)
treec7258e904658d1a5b9936ff284ebf44973e9cc5e /nixos
parent607312f76ac46232b6f690748ff0383a2249af05 (diff)
downloadnixlib-0824756d056e91cf1c40523877449a698ad71b77.tar
nixlib-0824756d056e91cf1c40523877449a698ad71b77.tar.gz
nixlib-0824756d056e91cf1c40523877449a698ad71b77.tar.bz2
nixlib-0824756d056e91cf1c40523877449a698ad71b77.tar.lz
nixlib-0824756d056e91cf1c40523877449a698ad71b77.tar.xz
nixlib-0824756d056e91cf1c40523877449a698ad71b77.tar.zst
nixlib-0824756d056e91cf1c40523877449a698ad71b77.zip
coolercontrol.*: init at 1.1.1
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/coolercontrol.nix37
2 files changed, 38 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index ec022713e12e..2203e1286fd1 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -162,6 +162,7 @@
   ./programs/clash-verge.nix
   ./programs/cnping.nix
   ./programs/command-not-found/command-not-found.nix
+  ./programs/coolercontrol.nix
   ./programs/criu.nix
   ./programs/darling.nix
   ./programs/dconf.nix
diff --git a/nixos/modules/programs/coolercontrol.nix b/nixos/modules/programs/coolercontrol.nix
new file mode 100644
index 000000000000..6e7299ad16b7
--- /dev/null
+++ b/nixos/modules/programs/coolercontrol.nix
@@ -0,0 +1,37 @@
+{ config
+, lib
+, pkgs
+, ...
+}:
+
+let
+  cfg = config.programs.coolercontrol;
+in
+{
+  ##### interface
+  options = {
+    programs.coolercontrol.enable = lib.mkEnableOption (lib.mdDoc "CoolerControl GUI & its background services");
+  };
+
+  ##### implementation
+  config = lib.mkIf cfg.enable {
+    environment.systemPackages = with pkgs.coolercontrol; [
+      coolercontrol-gui
+    ];
+
+    systemd = {
+      packages = with pkgs.coolercontrol; [
+        coolercontrol-liqctld
+        coolercontrold
+      ];
+
+      # https://github.com/NixOS/nixpkgs/issues/81138
+      services = {
+        coolercontrol-liqctld.wantedBy = [ "multi-user.target" ];
+        coolercontrold.wantedBy = [ "multi-user.target" ];
+      };
+    };
+  };
+
+  meta.maintainers = with lib.maintainers; [ OPNA2608 codifryed ];
+}