mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
31 lines
652 B
Nix
31 lines
652 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.thermald;
|
|
in {
|
|
###### interface
|
|
options = {
|
|
services.thermald = {
|
|
enable = mkOption {
|
|
default = false;
|
|
description = ''
|
|
Whether to enable thermald, the temperature management daemon.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
config = mkIf cfg.enable {
|
|
services.dbus.packages = [ pkgs.thermald ];
|
|
|
|
systemd.services.thermald = {
|
|
description = "Thermal Daemon Service";
|
|
wantedBy = [ "multi-user.target" ];
|
|
script = "exec ${pkgs.thermald}/sbin/thermald --no-daemon --dbus-enable";
|
|
};
|
|
};
|
|
}
|