Merge pull request 'Remove Golem-provider module' (#3847) from migrate-golemprovider into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3847
This commit is contained in:
pinpox
2025-06-04 11:09:35 +00:00
8 changed files with 1 additions and 111 deletions

View File

@@ -18,7 +18,6 @@ in
dyndns = ./dyndns;
ergochat = ./ergochat;
garage = ./garage;
golem-provider = ./golem-provider;
heisenbridge = ./heisenbridge;
importer = ./importer;
iwd = ./iwd;

View File

@@ -1,7 +0,0 @@
---
description = "Golem Provider for the Golem Network, an open-source and decentralized platform where everyone can use and share each other's computing power without relying on centralized entities like cloud computing corporations"
---
By running a golem provider your machine's compute resources are offered via the golem network which will allow other members to execute compute tasks on your machine. If this happens, you will be compensated with GLM, an ERC20 token.
More about golem providers: https://docs.golem.network/docs/golem/overview

View File

@@ -1,34 +0,0 @@
{ config, pkgs, ... }:
let
cfg = config.clan.golem-provider;
yagna = pkgs.callPackage ../../pkgs/yagna { };
accountFlag = if cfg.account != null then "--account ${cfg.account}" else "";
in
{
imports = [ ./interface.nix ];
users.users.golem = {
isSystemUser = true;
home = "/var/lib/golem";
group = "golem";
createHome = true;
};
users.groups.golem = { };
environment.systemPackages = [ yagna ];
systemd.services.golem-provider = {
description = "Golem Provider";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${yagna}/bin/golemsp run --no-interactive ${accountFlag}";
Restart = "always";
RestartSec = "5";
User = "golem";
Group = "golem";
};
};
}

View File

@@ -1,20 +0,0 @@
{ lib, ... }:
let
inherit (lib) mkOption;
inherit (lib.types) nullOr str;
in
{
options.clan.golem-provider = {
account = mkOption {
type = nullOr str;
description = ''
Ethereum address for payouts.
Leave empty to automatically generate a new address upon first start.
'';
default = null;
};
};
}

View File

@@ -1,4 +0,0 @@
{ ... }:
{
imports = [ ../. ];
}

View File

@@ -106,7 +106,6 @@ nav:
- reference/clanModules/dyndns.md
- reference/clanModules/ergochat.md
- reference/clanModules/garage.md
- reference/clanModules/golem-provider.md
- reference/clanModules/heisenbridge.md
- reference/clanModules/importer.md
- reference/clanModules/iwd.md

View File

@@ -1,4 +1,4 @@
{ inputs, ... }:
{ ... }:
{
imports = [
@@ -13,14 +13,6 @@
./testing/flake-module.nix
];
flake.packages.x86_64-linux =
let
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
in
{
yagna = pkgs.callPackage ./yagna { };
};
perSystem =
{ config, pkgs, ... }:
{

View File

@@ -1,35 +0,0 @@
{
stdenv,
fetchurl,
fetchzip,
makeWrapper,
}:
let
ya-runtime-vm = fetchzip {
url = "https://github.com/golemfactory/ya-runtime-vm/releases/download/pre-rel-v0.4.0-ITL-rc21/ya-runtime-vm-linux-pre-rel-v0.4.0-ITL-rc21.tar.gz";
sha256 = "sha256-z9dr5cr9j89AWdIFYVzdDZX6+nqLeIccioUvkSXn+7U=";
};
in
stdenv.mkDerivation (finalAttrs: {
name = "yagna";
version = "pre-rel-v0.16.0-preview.deposits.3";
src = fetchurl {
url = "https://github.com/golemfactory/yagna/releases/download/${finalAttrs.version}/golem-provider-linux-${finalAttrs.version}.tar.gz";
sha256 = "sha256-RbNqzNjppGa0zK3cmpt8X13CpUO3fuRzrjttl4cwsGM=2";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
mv * $out/bin
# wrap all executables under $out/bin using wrapProgram
for bin in $(find $out/bin -type f); do
wrapProgram $bin --prefix PATH : $out/bin
done
cp -r ${ya-runtime-vm}/* $out/bin/plugins/
'';
})