nixos/services.xmrig: remove with lib;
This commit is contained in:
parent
fe175fe575
commit
f8b0d3a756
@ -1,28 +1,22 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
|
||||
let
|
||||
cfg = config.services.xmrig;
|
||||
|
||||
json = pkgs.formats.json { };
|
||||
configFile = json.generate "config.json" cfg.settings;
|
||||
in
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options = {
|
||||
services.xmrig = {
|
||||
enable = mkEnableOption "XMRig Mining Software";
|
||||
enable = lib.mkEnableOption "XMRig Mining Software";
|
||||
|
||||
package = mkPackageOption pkgs "xmrig" {
|
||||
package = lib.mkPackageOption pkgs "xmrig" {
|
||||
example = "xmrig-mo";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
settings = lib.mkOption {
|
||||
default = { };
|
||||
type = json.type;
|
||||
example = literalExpression ''
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
autosave = true;
|
||||
cpu = true;
|
||||
@ -47,7 +41,7 @@ with lib;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.cpu.x86.msr.enable = true;
|
||||
|
||||
systemd.services.xmrig = {
|
||||
|
Loading…
Reference in New Issue
Block a user