nixos/xmrig: add kernel module msr
This commit is contained in:
parent
80e6ae766a
commit
47f638403e
1 changed files with 7 additions and 1 deletions
|
@ -51,6 +51,8 @@ with lib;
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.kernelModules = [ "msr" ];
|
||||
|
||||
systemd.services.xmrig = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
@ -58,7 +60,11 @@ with lib;
|
|||
serviceConfig = {
|
||||
ExecStartPre = "${cfg.package}/bin/xmrig --config=${configFile} --dry-run";
|
||||
ExecStart = "${cfg.package}/bin/xmrig --config=${configFile}";
|
||||
DynamicUser = true;
|
||||
# https://xmrig.com/docs/miner/randomx-optimization-guide/msr
|
||||
# If you use recent XMRig with root privileges (Linux) or admin
|
||||
# privileges (Windows) the miner configure all MSR registers
|
||||
# automatically.
|
||||
DynamicUser = lib.mkDefault false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue