From 76266ac03e91f88ababd953384d78c7020802418 Mon Sep 17 00:00:00 2001 From: Ivan Kirilov Dimitrov Date: Sun, 4 Aug 2024 15:11:01 +0200 Subject: [PATCH] add monero miner --- nixos/configs/default.nix | 8 +++++--- nixos/modules/default.nix | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/nixos/configs/default.nix b/nixos/configs/default.nix index 716d9e5..4802a95 100644 --- a/nixos/configs/default.nix +++ b/nixos/configs/default.nix @@ -17,10 +17,12 @@ in { flake.nixosConfigurations = { nova = novaConfig [ mods.ivand ]; - nova-music = novaConfig (with mods; [ music ivand ]); - nova-nonya = novaConfig (with mods; [ anon cryptocurrency ivand ]); - nova-ai = novaConfig (with mods; [ ai ivand ]); + nova-music = novaConfig (with mods; [ ivand music ]); + nova-crypto = novaConfig (with mods; [ ivand cryptocurrency ]); + nova-nonya = novaConfig (with mods; [ ivand anon cryptocurrency ]); + nova-ai = novaConfig (with mods; [ ivand ai ]); install-iso = configWithModules { modules = (with mods; [ grub base shell wireless ]); }; vps = configWithModules { modules = (with mods; [ base shell security vps ]); }; + stara-miner = configWithModules { modules = (with mods; [ base shell security monero-miner ]); }; }; } diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 90d2651..a2ad192 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -215,6 +215,27 @@ top@{ inputs, moduleWithSystem, ... }: { environment.systemPackages = with pkgs; [ monero-cli ]; services = { monero.enable = true; }; }); + monero-miner = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { + services = { + xmrig = { + enable = true; + settings = { + autosave = true; + cpu = true; + opencl = false; + cuda = false; + pools = [ + { + url = "pool.supportxmr.com:443"; + user = "48e9t9xvq4M4HBWomz6whiY624YRCPwgJ7LPXngcc8pUHk6hCuR3k6ENpLGDAhPEHWaju8Z4btxkbENpcwaqWcBvLxyh5cn"; + keepalive = true; + tls = true; + } + ]; + }; + }; + }; + }); vps = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { imports = [ inputs.vpsadminos.nixosConfigurations.container