Merge pull request #256725 from trofi/modules-xmr-stak-cudaSupport-removal
modules/xmr-stak: drop broken cudaSupport option
This commit is contained in:
commit
fbf686309f
1 changed files with 2 additions and 6 deletions
|
@ -7,7 +7,7 @@ let
|
||||||
cfg = config.services.xmr-stak;
|
cfg = config.services.xmr-stak;
|
||||||
|
|
||||||
pkg = pkgs.xmr-stak.override {
|
pkg = pkgs.xmr-stak.override {
|
||||||
inherit (cfg) openclSupport cudaSupport;
|
inherit (cfg) openclSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -17,7 +17,6 @@ in
|
||||||
services.xmr-stak = {
|
services.xmr-stak = {
|
||||||
enable = mkEnableOption (lib.mdDoc "xmr-stak miner");
|
enable = mkEnableOption (lib.mdDoc "xmr-stak miner");
|
||||||
openclSupport = mkEnableOption (lib.mdDoc "support for OpenCL (AMD/ATI graphics cards)");
|
openclSupport = mkEnableOption (lib.mdDoc "support for OpenCL (AMD/ATI graphics cards)");
|
||||||
cudaSupport = mkEnableOption (lib.mdDoc "support for CUDA (NVidia graphics cards)");
|
|
||||||
|
|
||||||
extraArgs = mkOption {
|
extraArgs = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
|
@ -64,15 +63,12 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
bindsTo = [ "network-online.target" ];
|
bindsTo = [ "network-online.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
environment = mkIf cfg.cudaSupport {
|
|
||||||
LD_LIBRARY_PATH = "${pkgs.linuxPackages_latest.nvidia_x11}/lib";
|
|
||||||
};
|
|
||||||
|
|
||||||
preStart = concatStrings (flip mapAttrsToList cfg.configFiles (fn: content: ''
|
preStart = concatStrings (flip mapAttrsToList cfg.configFiles (fn: content: ''
|
||||||
ln -sf '${pkgs.writeText "xmr-stak-${fn}" content}' '${fn}'
|
ln -sf '${pkgs.writeText "xmr-stak-${fn}" content}' '${fn}'
|
||||||
''));
|
''));
|
||||||
|
|
||||||
serviceConfig = let rootRequired = cfg.openclSupport || cfg.cudaSupport; in {
|
serviceConfig = let rootRequired = cfg.openclSupport; in {
|
||||||
ExecStart = "${pkg}/bin/xmr-stak ${concatStringsSep " " cfg.extraArgs}";
|
ExecStart = "${pkg}/bin/xmr-stak ${concatStringsSep " " cfg.extraArgs}";
|
||||||
# xmr-stak generates cpu and/or gpu configuration files
|
# xmr-stak generates cpu and/or gpu configuration files
|
||||||
WorkingDirectory = "/tmp";
|
WorkingDirectory = "/tmp";
|
||||||
|
|
Loading…
Reference in a new issue