sisyphus/nixos/modules/services/monero/default.nix

42 lines
992 B
Nix
Raw Permalink Normal View History

2024-03-13 08:16:17 +01:00
{ config, lib, pkgs, ... }:
let
cfg = config.sisyphus.services.monero;
in {
options.sisyphus.services.monero.enable = lib.mkEnableOption "Monero";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
monero-cli
];
services = {
2024-03-27 16:29:15 +01:00
# Choose to run a node or not.
2024-03-13 08:16:17 +01:00
monero.enable = true;
2024-03-27 16:29:15 +01:00
2024-03-13 08:16:17 +01:00
xmrig = {
enable = true;
settings = {
autosave = true;
background = true;
pause-on-battery = true;
2024-03-27 16:29:15 +01:00
pause-on-active = 60;
2024-03-13 08:16:17 +01:00
donate-level = 5;
cpu = true;
opencl = false;
cuda = true;
pools = [
{
2024-03-27 16:29:15 +01:00
url = "monerohash.com:9999";
# url = "127.0.0.1:18081"; # Local node
2024-03-13 08:16:17 +01:00
user = "44FjmmLn1k1GC1AFTLSdWDZ17CHB2h3eRCnfkfTQBucHaKX1AGS5oLERR1FEaHxPQcUNwrbEfsgbY4Y6bYJm6ZrdCYGwg7b";
keepalive = true;
tls = true;
}
];
};
};
};
};
}