mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
Merge pull request #44923 from Vodurden/add-thermald-config
nixos/thermald: add manual config generation
This commit is contained in:
commit
730b8b1706
@ -14,6 +14,20 @@ in {
|
||||
Whether to enable thermald, the temperature management daemon.
|
||||
'';
|
||||
};
|
||||
|
||||
debug = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable debug logging.
|
||||
'';
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "the thermald manual configuration file.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -24,7 +38,15 @@ in {
|
||||
systemd.services.thermald = {
|
||||
description = "Thermal Daemon Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = "exec ${pkgs.thermald}/sbin/thermald --no-daemon --dbus-enable";
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.thermald}/sbin/thermald \
|
||||
--no-daemon \
|
||||
${optionalString cfg.debug "--loglevel=debug"} \
|
||||
${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \
|
||||
--dbus-enable
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user