fw-fanctrl: set default strategies (#426756)

lassulus 04009c66 3935fce4

Changed files
+35 -37
nixos
modules
hardware
+35 -37
nixos/modules/hardware/fw-fanctrl.nix
···
};
strategies = lib.mkOption {
-
default = null;
+
default = { };
description = ''
Additional strategies which can be used by fw-fanctrl
'';
-
type = lib.types.nullOr (
-
lib.types.attrsOf (
-
lib.types.submodule {
-
options = {
-
fanSpeedUpdateFrequency = lib.mkOption {
-
type = lib.types.ints.unsigned;
-
default = 5;
-
description = "How often the fan speed should be updated in seconds";
-
};
-
-
movingAverageInterval = lib.mkOption {
-
type = lib.types.ints.unsigned;
-
default = 25;
-
description = "Interval (seconds) of the last temperatures to use to calculate the average temperature";
-
};
+
type = lib.types.attrsOf (
+
lib.types.submodule {
+
options = {
+
fanSpeedUpdateFrequency = lib.mkOption {
+
type = lib.types.ints.unsigned;
+
default = 5;
+
description = "How often the fan speed should be updated in seconds";
+
};
-
speedCurve = lib.mkOption {
-
default = [ ];
-
description = "How should the speed curve look like";
-
type = lib.types.listOf (
-
lib.types.submodule {
-
options = {
-
temp = lib.mkOption {
-
type = lib.types.int;
-
default = 0;
-
description = "Temperature in °C at which the fan speed should be changed";
-
};
+
movingAverageInterval = lib.mkOption {
+
type = lib.types.ints.unsigned;
+
default = 25;
+
description = "Interval (seconds) of the last temperatures to use to calculate the average temperature";
+
};
-
speed = lib.mkOption {
-
type = lib.types.ints.between 0 100;
-
default = 0;
-
description = "Percent how fast the fan should run at";
-
};
+
speedCurve = lib.mkOption {
+
default = [ ];
+
description = "How should the speed curve look like";
+
type = lib.types.listOf (
+
lib.types.submodule {
+
options = {
+
temp = lib.mkOption {
+
type = lib.types.int;
+
default = 0;
+
description = "Temperature in °C at which the fan speed should be changed";
+
};
+
speed = lib.mkOption {
+
type = lib.types.ints.between 0 100;
+
default = 0;
+
description = "Percent how fast the fan should run at";
};
-
}
-
);
-
};
+
+
};
+
}
+
);
};
-
}
-
)
+
};
+
}
);
};
};