diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-21 18:13:41 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-21 18:14:53 +0000 |
commit | 4bded92554967c3475702d32abc260e37bc2a2d2 (patch) | |
tree | b9b0f0eaa08df784fd0cff9514851eb810227a43 /nixos/modules/services/hardware | |
parent | e49c1a0027eb1d41cbc74f15f5a3295c62d4d040 (diff) | |
download | nixpkgs-4bded92554967c3475702d32abc260e37bc2a2d2.tar nixpkgs-4bded92554967c3475702d32abc260e37bc2a2d2.tar.gz nixpkgs-4bded92554967c3475702d32abc260e37bc2a2d2.tar.bz2 nixpkgs-4bded92554967c3475702d32abc260e37bc2a2d2.tar.lz nixpkgs-4bded92554967c3475702d32abc260e37bc2a2d2.tar.xz nixpkgs-4bded92554967c3475702d32abc260e37bc2a2d2.tar.zst nixpkgs-4bded92554967c3475702d32abc260e37bc2a2d2.zip |
nixos/thermald: Allow switching package
Sometimes newer versions than what nixpkgs provides is needed for certain hardware, especially for stable releases where I will backport this commit.
Diffstat (limited to 'nixos/modules/services/hardware')
-rw-r--r-- | nixos/modules/services/hardware/thermald.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/services/hardware/thermald.nix b/nixos/modules/services/hardware/thermald.nix index 6be255cebf1..aa936ac09d1 100644 --- a/nixos/modules/services/hardware/thermald.nix +++ b/nixos/modules/services/hardware/thermald.nix @@ -23,19 +23,26 @@ in { default = null; description = "the thermald manual configuration file."; }; + + package = mkOption { + type = types.package; + default = pkgs.thermald; + defaultText = "pkgs.thermald"; + description = "Which thermald package to use."; + }; }; }; ###### implementation config = mkIf cfg.enable { - services.dbus.packages = [ pkgs.thermald ]; + services.dbus.packages = [ cfg.package ]; systemd.services.thermald = { description = "Thermal Daemon Service"; wantedBy = [ "multi-user.target" ]; serviceConfig = { ExecStart = '' - ${pkgs.thermald}/sbin/thermald \ + ${cfg.package}/sbin/thermald \ --no-daemon \ ${optionalString cfg.debug "--loglevel=debug"} \ ${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \ |