mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 15:38:26 +01:00
Compare commits
No commits in common. "dc95d6fd776905634d5e7cca7bb35818c6cd0332" and "c95fc0be119a4b8fbecbe62a736c86adb9483f55" have entirely different histories.
dc95d6fd77
...
c95fc0be11
1 changed files with 1 additions and 31 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, inputs, ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [ inputs.nixos-hardware.nixosModules.hardkernel-odroid-h4 ];
|
imports = [ inputs.nixos-hardware.nixosModules.hardkernel-odroid-h4 ];
|
||||||
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
"coretemp"
|
"coretemp"
|
||||||
"it87"
|
"it87"
|
||||||
];
|
];
|
||||||
extraModulePackages = [ config.boot.kernelPackages.it87 ];
|
|
||||||
initrd.availableKernelModules = [
|
initrd.availableKernelModules = [
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
"ahci"
|
"ahci"
|
||||||
|
|
@ -42,33 +41,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Ensure pwm2_enable is set to 2 (automatic) before fancontrol starts,
|
|
||||||
# because the IT8613E can't transition 0 -> 1 (manual) directly,
|
|
||||||
# but can do 2 -> 1 which fancontrol requires.
|
|
||||||
systemd.services.fancontrol-pwm-init = {
|
|
||||||
description = "Initialize IT8613E PWM mode for fancontrol";
|
|
||||||
before = [ "fancontrol.service" ];
|
|
||||||
requiredBy = [ "fancontrol.service" ];
|
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
script = "echo 2 > /sys/devices/platform/it87.2608/hwmon/hwmon*/pwm2_enable";
|
|
||||||
unitConfig.ConditionPathExists = "/sys/devices/platform/it87.2608";
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.fancontrol = {
|
|
||||||
enable = true;
|
|
||||||
config = ''
|
|
||||||
INTERVAL=5
|
|
||||||
DEVPATH=hwmon1=devices/platform/coretemp.0 hwmon2=devices/platform/it87.2608
|
|
||||||
DEVNAME=hwmon1=coretemp hwmon2=it8613
|
|
||||||
FCTEMPS=hwmon2/pwm2=hwmon1/temp1_input
|
|
||||||
FCFANS=hwmon2/pwm2=hwmon2/fan2_input
|
|
||||||
MINTEMP=hwmon2/pwm2=70
|
|
||||||
MAXTEMP=hwmon2/pwm2=100
|
|
||||||
MINSTART=hwmon2/pwm2=35
|
|
||||||
MINSTOP=hwmon2/pwm2=25
|
|
||||||
MINPWM=hwmon2/pwm2=0
|
|
||||||
MAXPWM=hwmon2/pwm2=255
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue