1
0
Pārlūkot izejas kodu

fix(nix): fixed global config

Zander Hawke 9 mēneši atpakaļ
vecāks
revīzija
f979d5866a
1 mainītis faili ar 39 papildinājumiem un 19 dzēšanām
  1. 39 19
      hosts/odin/default.nix

+ 39 - 19
hosts/odin/default.nix

@@ -1,6 +1,7 @@
-{ inputs, pkgs, lib, ... }:
+{ inputs, outputs, pkgs, lib, config, ... }:
 {
   imports = [
+    outputs.modules.global.nix-config
     # inputs.impermanence.nixosModules.impermanence
     inputs.disko.nixosModules.disko
 
@@ -29,6 +30,20 @@
     # };
   };
 
+  hardware.fancontrol.enable = true;
+  hardware.fancontrol.config = ''
+    # Configuration file generated by pwmconfig, changes will be lost
+    INTERVAL=10
+    DEVPATH=
+    DEVNAME=
+    FCTEMPS=
+    FCFANS=
+    MINTEMP=
+    MAXTEMP=
+    MINSTART=
+    MINSTOP=
+  '';
+
   # Boot configuration
   boot = {
     # Use systemd-boot for UEFI systems
@@ -142,24 +157,29 @@
     #   interval = "monthly";
     #   fileSystems = [ "/" ];
     # };
-    #
-    # # Drive power management and fan control
-    # hddfancontrol = {
-    #   enable = false;
-    #   settings = {
-    #     harddrives = {
-    #       disks = [
-    #         "/dev/disk/by-id/ata-ST8000VN002-2ZM188_WPV023WG"
-    #         "/dev/disk/by-id/ata-ST8000VN002-2ZM188_WPV07RMA"
-    #         "/dev/disk/by-id/ata-ST8000VN002-2ZM188_WPV020CG"
-    #       ];
-    #       pwmPaths = [
-    #         "/sys/class/hwmon/hwmon5/pwm1:25:10"
-    #       ];
-    #       logVerbosity = "DEBUG";
-    #     };
-    #   };
-    # };
+
+    # Drive power management and fan control
+    hddfancontrol = {
+      enable = false;
+      settings = {
+        harddrives =
+          let
+            devices = config.disko.device;
+          in
+          {
+            disks = [
+              devices.storage1.device
+              devices.storage2.device
+              devices.storage3.device
+            ];
+            pwmPaths = [
+              "/sys/class/hwmon/hwmon1/pwm1:10:5"
+              "/sys/class/hwmon/hwmon1/pwm2:10:5"
+            ];
+            logVerbosity = "DEBUG";
+          };
+      };
+    };
 
     # Drive spin-down management
     # hdparm.devices = [