my nix configs for my servers and desktop
1{ config, lib, pkgs, ... }: 2 3with lib; 4let 5 cfg = config.modules.monero; 6 7 #TODO make this configurable through nix 8 address = "46Ev6Vk4QeQZTr14tRjksTT2VPhi4jKB48mGz31rpUUci2Bvg9PHZj9GLK3VceWDc13tkUbzmqQz8eKR3hkD9bUKFKHLrzg"; 9 dataDir = "/storage/monero"; 10 miningThreads = 6; 11 user = "regent"; 12 password = "AnRPCPasswordChangedImperatively"; 13 rpcAddress = "127.0.0.1"; 14 rpcPort = 18081; 15in 16{ 17 options = { 18 modules = { 19 monero = { 20 enable = mkEnableOption "Deploy monero node"; 21 }; 22 }; 23 }; 24 25 config = mkIf cfg.enable { 26 services.monero = { 27 enable = true; 28 dataDir = dataDir; 29 rpc = { 30 user = user; 31 password = password; 32 address = rpcAddress; 33 port = rpcPort; 34 }; 35 mining = { 36 enable = true; 37 threads = miningThreads; 38 address = address; 39 }; 40 }; 41 }; 42}