nixos/ethminer: always restart
This commit is contained in:
parent
7a01e9096e
commit
90ee16dbfc
@ -71,7 +71,7 @@ in
|
|||||||
|
|
||||||
maxPower = mkOption {
|
maxPower = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 115;
|
default = 113;
|
||||||
description = "Miner max watt usage.";
|
description = "Miner max watt usage.";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -92,7 +92,9 @@ in
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
ExecStartPre = "${pkgs.ethminer}/bin/.ethminer-wrapped --list-devices";
|
||||||
ExecStartPost = optional (cfg.toolkit == "cuda") "+${getBin config.boot.kernelPackages.nvidia_x11}/bin/nvidia-smi -pl ${toString cfg.maxPower}";
|
ExecStartPost = optional (cfg.toolkit == "cuda") "+${getBin config.boot.kernelPackages.nvidia_x11}/bin/nvidia-smi -pl ${toString cfg.maxPower}";
|
||||||
|
Restart = "always";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user