anchor.diff:    pkg = pkgs.xmr-stak.override {
       inherit (cfg) openclSupport cudaSupport;
     };
  -
  -  xmrConfArg = optionalString (cfg.configText != "") ("-c " +
  -    pkgs.writeText "xmr-stak-config.txt" cfg.configText);
   
   in
   
  
positive.code:         description = "List of parameters to pass to xmr-stak.";
        };
  
        configText = mkOption {
          type = types.lines;
          default = "";
          example = ''
            "currency" : "monero",
            "pool_list" :
              [ { "pool_address" : "pool.supportxmr.com:5555",
                  "wallet_address" : "<long-hash>",
                  "pool_password" : "minername",
                  "pool_weight" : 1,
                },
              ],
          '';
          description = ''
            Verbatim xmr-stak config.txt. If empty, the <literal>-c</literal>
            parameter will not be added to the xmr-stak command.
          '';
        };
      };
  
negative.code:       environment = mkIf cfg.cudaSupport {
          LD_LIBRARY_PATH = "${pkgs.linuxPackages_latest.nvidia_x11}/lib";
        };
  
        preStart = concatStrings (flip mapAttrsToList cfg.configFiles (fn: content: ''
          ln -sf '${pkgs.writeText "xmr-stak-${fn}" content}' '${fn}'
        ''));
  
        serviceConfig = let rootRequired = cfg.openclSupport || cfg.cudaSupport; in {
          ExecStart = "${pkg}/bin/xmr-stak ${concatStringsSep " " cfg.extraArgs}";
          # xmr-stak generates cpu and/or gpu configuration files
          WorkingDirectory = "/tmp";
          PrivateTmp = true;
  