missing defaults
This commit is contained in:
1 parent
3cb0b970bf
commit
5242850fbc
3 files changed
+27
-5
No files matched your search
@@ -10,11 +10,17 @@ in
|
||||
options.skyg.nixos.common.hardware.fancontrol = with lib; {
|
||||
enable = mkEnableOption "fancontrol";
|
||||
configName = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "thinkpad";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [{
|
||||
assertion = cfg.configName != null; # only checked when enable = true
|
||||
message = "skyg.nixos.common.hardware.fancontrol: configName must be set when fancontrol is enabled";
|
||||
}];
|
||||
systemd.services.fancontrol = {
|
||||
enable = true;
|
||||
description = "Fan control";
|
||||
|
||||
Reference in new issue
Block a user