nixos/undervolt: respect services.undervolt.package

This patch also removes useless systemd.services.undervolt.path.

Fixes #156668
This commit is contained in:
linj
2022-02-11 03:57:02 +08:00
parent 98bb5b77c8
commit c9013da695
@@ -164,8 +164,6 @@ in
environment.systemPackages = [ cfg.package ];
systemd.services.undervolt = {
path = [ pkgs.undervolt ];
description = "Intel Undervolting Service";
# Apply undervolt on boot, nixos generation switch and resume
@@ -175,7 +173,7 @@ in
serviceConfig = {
Type = "oneshot";
Restart = "no";
ExecStart = "${pkgs.undervolt}/bin/undervolt ${toString cliArgs}";
ExecStart = "${cfg.package}/bin/undervolt ${toString cliArgs}";
};
};