i love burning electricity
This commit is contained in:
parent
a02bdad904
commit
1e750a8968
2 changed files with 80 additions and 28 deletions
42
modules/monero/default.nix
Normal file
42
modules/monero/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue