at 25.11-pre 1.2 kB view raw
1{ pkgs, ... }: 2{ 3 name = "fancontrol"; 4 meta = with pkgs.lib.maintainers; { 5 maintainers = [ evils ]; 6 }; 7 8 nodes.machine = 9 { ... }: 10 { 11 imports = [ ../modules/profiles/minimal.nix ]; 12 hardware.fancontrol.enable = true; 13 hardware.fancontrol.config = '' 14 INTERVAL=42 15 DEVPATH=hwmon1=devices/platform/dummy 16 DEVNAME=hwmon1=dummy 17 FCTEMPS=hwmon1/device/pwm1=hwmon1/device/temp1_input 18 FCFANS=hwmon1/device/pwm1=hwmon1/device/fan1_input 19 MINTEMP=hwmon1/device/pwm1=25 20 MAXTEMP=hwmon1/device/pwm1=65 21 MINSTART=hwmon1/device/pwm1=150 22 MINSTOP=hwmon1/device/pwm1=0 23 ''; 24 }; 25 26 # This configuration cannot be valid for the test VM, so it's expected to get an 'outdated' error. 27 testScript = '' 28 start_all() 29 # can't wait for unit fancontrol.service because it doesn't become active due to invalid config 30 # fancontrol.service is WantedBy multi-user.target 31 machine.wait_for_unit("multi-user.target") 32 machine.succeed( 33 "journalctl -eu fancontrol | tee /dev/stderr | grep 'Configuration appears to be outdated'" 34 ) 35 machine.shutdown() 36 ''; 37}