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; with tools.nginx;
let let
inherit (tools.meta) domain; inherit (tools.meta) domain;
@ -6,22 +6,11 @@ let
gw = config.links.ipfsGateway; gw = config.links.ipfsGateway;
in in
{ {
imports = [
aspect.modules.ipfs
];
systemd.services.ipfs = { systemd.services.ipfs = {
serviceConfig = { serviceConfig = {
LimitNOFILE = 524288; LimitNOFILE = 524288;
IOSchedulingPriority = 7; 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 = { 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 in
{ {
age.secrets.ipfs-swarm-key = { age.secrets.ipfs-swarm-key = {
file = ../../secrets/ipfs-swarm-key.age; file = ../../../secrets/ipfs-swarm-key.age;
mode = "0400"; mode = "0400";
owner = cfg.user; owner = cfg.user;
inherit (cfg) group; inherit (cfg) group;

View file

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

View file

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

View file

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