cluster/services/ipfs: init from modules/ipfs

This commit is contained in:
Max Headroom 2022-10-19 20:25:19 +02:00
parent 3a99af772f
commit 41aad67a83
7 changed files with 34 additions and 16 deletions

View file

@ -0,0 +1,19 @@
{ tools, ... }:
{
services.ipfs = {
nodes = {
node = [ "VEGAS" "prophet" ];
gateway = [ "VEGAS" ];
};
nixos = {
node = [
./node.nix
];
gateway = [
./gateway.nix
./monitoring.nix
];
};
};
}

View file

@ -1,4 +1,4 @@
{ aspect, config, hosts, tools, ... }:
{ config, hosts, tools, ... }:
with tools.nginx;
let
inherit (tools.meta) domain;
@ -6,22 +6,11 @@ let
gw = config.links.ipfsGateway;
in
{
imports = [
aspect.modules.ipfs
];
systemd.services.ipfs = {
serviceConfig = {
LimitNOFILE = 524288;
IOSchedulingPriority = 7;
};
environment = {
OTEL_TRACES_EXPORTER = "otlp";
OTEL_EXPORTER_OTLP_PROTOCOL = "grpc";
OTEL_EXPORTER_OTLP_ENDPOINT = config.links.tempo-otlp-grpc.url;
OTEL_TRACES_SAMPLER = "parentbased_traceidratio";
OTEL_TRACES_SAMPLER_ARG = "0.01";
};
};
systemd.slices.remotefshost.sliceConfig = {

View file

@ -0,0 +1,13 @@
{ config, ... }:
{
systemd.services.ipfs = {
environment = {
OTEL_TRACES_EXPORTER = "otlp";
OTEL_EXPORTER_OTLP_PROTOCOL = "grpc";
OTEL_EXPORTER_OTLP_ENDPOINT = config.links.tempo-otlp-grpc.url;
OTEL_TRACES_SAMPLER = "parentbased_traceidratio";
OTEL_TRACES_SAMPLER_ARG = "0.01";
};
};
}

View file

@ -9,7 +9,7 @@ let
in
{
age.secrets.ipfs-swarm-key = {
file = ../../secrets/ipfs-swarm-key.age;
file = ../../../secrets/ipfs-swarm-key.age;
mode = "0400";
owner = cfg.user;
inherit (cfg) group;

View file

@ -22,7 +22,6 @@
./services/fbi
./services/gitlab
./services/hydra
./services/ipfs
./services/jokes
./services/nextcloud
./services/nfs

View file

@ -14,7 +14,6 @@
./services/reflex
aspect.modules.hercules-ci-agent
aspect.modules.hyprspace
aspect.modules.ipfs
aspect.modules.nix-builder
aspect.modules.sss

View file

@ -9,7 +9,6 @@ let
hercules-ci-agent = import ./hercules-ci-agent;
hydra = import ./hydra;
hyprspace = import ./hyprspace;
ipfs = import ./ipfs;
maintenance = import ./maintenance;
minimal = import ./minimal;
motd = import ./motd;