mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-10 17:34:05 -05:00
monerod and p2pool seem to be working
This commit is contained in:
parent
199b5d31d8
commit
a97f024d44
3 changed files with 95 additions and 1 deletions
40
hosts/common/optional/services/monero/miner.nix
Normal file
40
hosts/common/optional/services/monero/miner.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs.unstable)
|
||||
monero-gui
|
||||
monero-cli
|
||||
p2pool
|
||||
xmrig
|
||||
;
|
||||
};
|
||||
|
||||
users.users.p2pool = {
|
||||
isSystemUser = true;
|
||||
group = "p2pool";
|
||||
description = "p2pool daemon user";
|
||||
home = "/var/lib/p2pool";
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
users.groups.p2pool = { };
|
||||
|
||||
systemd.services.p2pool = {
|
||||
description = "p2pool daemon";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "p2pool";
|
||||
Group = "p2pool";
|
||||
ExecStart = "${pkgs.unstable.p2pool}/bin/p2pool --host 127.0.0.1 --wallet 48kwCPHhnbXfriMCtGHu4BRrc8dwmhUxVdD1ycATtDigW4Fjrsfhi7wQ2QSNyvspxaN7Tt2dApAEbFhTeSPD9w1x4JmyzTg --nano";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
51
hosts/common/optional/services/monero/node.nix
Normal file
51
hosts/common/optional/services/monero/node.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs.unstable)
|
||||
monero-cli
|
||||
;
|
||||
};
|
||||
|
||||
users.users.monero = {
|
||||
isSystemUser = true;
|
||||
group = "monero";
|
||||
description = "Monero daemon user";
|
||||
home = "/var/lib/monero";
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
users.groups.monero = { };
|
||||
|
||||
systemd.services.monero = {
|
||||
description = "monero daemon";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig =
|
||||
let
|
||||
moneroConfig = pkgs.writeText "monerod_config.conf" ''
|
||||
log-file=/dev/stdout
|
||||
data-dir=${config.users.users.monero.home}
|
||||
add-priority-node=p2pmd.xmrvsbeast.com:18080
|
||||
add-priority-node=nodes.hashvault.pro:18080
|
||||
enable-dns-blocklist=1
|
||||
'';
|
||||
in
|
||||
{
|
||||
User = "monero";
|
||||
Group = "monero";
|
||||
ExecStart = "${pkgs.unstable.monero-cli}/bin/monerod --config-file=${moneroConfig} --non-interactive";
|
||||
Restart = "always";
|
||||
SuccessExitStatus = [
|
||||
0
|
||||
1
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = lib.flatten [
|
||||
# Hardware
|
||||
./hardware-configuration.nix # I want to use factor if possible
|
||||
|
|
@ -38,6 +39,8 @@
|
|||
"hosts/common/optional/vbox.nix"
|
||||
"hosts/common/optional/printing.nix"
|
||||
"hosts/common/optional/docker.nix"
|
||||
"hosts/common/optional/services/monero/node.nix"
|
||||
"hosts/common/optional/services/monero/miner.nix"
|
||||
"modules/services/ollama"
|
||||
"modules/services/mesh/client.nix"
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue