42 lines
No EOL
873 B
Nix
42 lines
No EOL
873 B
Nix
{ 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;
|
|
};
|
|
};
|
|
};
|
|
} |