From f8b0d3a756825f8c19bfc691fe8f642765fbab90 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Fri, 30 Aug 2024 00:46:53 +0200 Subject: [PATCH] nixos/services.xmrig: remove `with lib;` --- nixos/modules/services/misc/xmrig.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/misc/xmrig.nix b/nixos/modules/services/misc/xmrig.nix index d4e1be779972..4317f197d008 100644 --- a/nixos/modules/services/misc/xmrig.nix +++ b/nixos/modules/services/misc/xmrig.nix @@ -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 = {