i love burning electricity

This commit is contained in:
waveringana 2025-06-19 07:11:52 -04:00
parent a02bdad904
commit 1e750a8968
2 changed files with 80 additions and 28 deletions

View file

@ -0,0 +1,42 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.monero;
#TODO make this configurable through nix
address = "46Ev6Vk4QeQZTr14tRjksTT2VPhi4jKB48mGz31rpUUci2Bvg9PHZj9GLK3VceWDc13tkUbzmqQz8eKR3hkD9bUKFKHLrzg";
dataDir = "/storage/monero";
miningThreads = 6;
user = "regent";
password = "AnRPCPasswordChangedImperatively";
rpcAddress = "10.0.0.30";
rpcPort = 18081;
in
{
options = {
modules = {
monero = {
enable = mkEnableOption "Deploy monero node";
};
};
};
config = mkIf cfg.enable {
services.monero = {
enable = true;
dataDir = dataDir;
rpc = {
user = user;
password = password;
address = rpcAddress;
port = rpcPort;
};
mining = {
enable = true;
threads = miningThreads;
address = address;
};
};
};
}