[throttled] Enable custom config
This commit is contained in:
parent
62a916defd
commit
95dec03601
@ -8,6 +8,12 @@ in {
|
|||||||
options = {
|
options = {
|
||||||
services.throttled = {
|
services.throttled = {
|
||||||
enable = mkEnableOption "fix for Intel CPU throttling";
|
enable = mkEnableOption "fix for Intel CPU throttling";
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = "Alternative configuration";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -16,6 +22,9 @@ in {
|
|||||||
# The upstream package has this in Install, but that's not enough, see the NixOS manual
|
# The upstream package has this in Install, but that's not enough, see the NixOS manual
|
||||||
systemd.services."lenovo_fix".wantedBy = [ "multi-user.target" ];
|
systemd.services."lenovo_fix".wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
environment.etc."lenovo_fix.conf".source = "${pkgs.throttled}/etc/lenovo_fix.conf";
|
environment.etc."lenovo_fix.conf".source =
|
||||||
|
if cfg.extraConfig != ""
|
||||||
|
then pkgs.writeText "lenovo_fix.conf" cfg.extraConfig
|
||||||
|
else "${pkgs.throttled}/etc/lenovo_fix.conf";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user