server: do stuff

This commit is contained in:
2025-12-21 23:31:03 +02:00
parent 08fd0ea72c
commit 3d698f8631
8 changed files with 278 additions and 171 deletions

View File

@@ -1,26 +1,31 @@
{ config, inputs, pkgs, ... }:
{
config,
inputs,
pkgs,
...
}:
{
# TODO:
# Upload PDS backup to /var/lib/pds
# and specify secrets in /private/atproto-pds.env
services.bluesky-pds = {
enable = true;
pdsadmin.enable = true;
environmentFiles = [ "/private/atproto-pds.env" ];
settings = {
PDS_CRAWLERS = "https://bsky.network";
LOG_ENABLED = "true";
PDS_HOSTNAME = "pds.ocbwoy3.dev";
# PDS_VERSION = "\"ATProto PDS v69420\"";
PDS_DID_PLC_URL = "https://plc.directory";
PDS_CONTACT_EMAIL_ADDRESS = "ocbwoy3@ocbwoy3.dev";
PDS_PRIVACY_POLICY_URL = "https://ocbwoy3.dev";
PDS_TERMS_OF_SERVICE_URL = "https://ocbwoy3.dev";
PDS_ACCEPTING_REPO_IMPORTS = "true";
};
};
# TODO:
# Upload PDS backup to /var/lib/pds
# and specify secrets in /private/atproto-pds.env
services.bluesky-pds = {
enable = true;
pdsadmin.enable = true;
environmentFiles = [ "/private/atproto-pds.env" ];
settings = {
PDS_CRAWLERS = "https://bsky.network";
LOG_ENABLED = "true";
PDS_HOSTNAME = "pds.ocbwoy3.dev";
# PDS_VERSION = "\"ATProto PDS v69420\"";
PDS_DID_PLC_URL = "https://plc.directory";
PDS_CONTACT_EMAIL_ADDRESS = "ocbwoy3@ocbwoy3.dev";
PDS_PRIVACY_POLICY_URL = "https://ocbwoy3.dev";
PDS_TERMS_OF_SERVICE_URL = "https://ocbwoy3.dev";
PDS_ACCEPTING_REPO_IMPORTS = "true";
};
};
}

View File

@@ -1,21 +1,26 @@
{ config, inputs, pkgs, ... }:
{
config,
inputs,
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
cloudflared
];
# lib.mkIf (isOCbwoy3 == true)
services.cloudflared = {
enable = true;
tunnels = {
"selfhost" = {
# 2f83f704-e9f7-49fb-a6c4-d4a8f85d87e4
default = "http_status:404";
credentialsFile = "/private/cloudflared/selfhost.json";
};
};
};
environment.systemPackages = with pkgs; [
cloudflared
];
# lib.mkIf (isOCbwoy3 == true)
services.cloudflared = {
enable = true;
tunnels = {
"selfhost" = {
# 2f83f704-e9f7-49fb-a6c4-d4a8f85d87e4
default = "http_status:404";
credentialsFile = "/private/cloudflared/selfhost.json";
};
};
};
}

View File

@@ -0,0 +1,34 @@
{
config,
pkgs,
lib,
...
}:
{
services.gitea = {
enable = true;
database = {
type = "postgres";
};
settings = {
server = {
DOMAIN = "git.ocbwoy3.dev";
ROOT_URL = "https://git.ocbwoy3.dev/";
HTTP_PORT = 2222;
DISABLE_SSH = true;
MAX_UPLOAD_FILE_SIZE = 5242880;
};
attachment = {
MAX_SIZE = 5; # MB (this is the one causing the 1024 KiB error)
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
}

View File

@@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
inputs,
...
}:
{
imports = [ inputs.spacebar.nixosModules.default ];
services.spacebarchat-server = {
enable = true;
package = inputs.spacebar.packages.${pkgs.stdenv.hostPlatform.system}.default;
extraEnvironment.PORT = 4067;
};
}

View File

@@ -1,21 +1,26 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
services.tangled-knot = {
enable = true;
server = {
listenAddr = "0.0.0.0:3003";
owner = "did:plc:s7cesz7cr6ybltaryy4meb6y";
hostname = "knot.ocbwoy3.dev";
};
};
services.tangled.knot = {
enable = true;
server = {
listenAddr = "0.0.0.0:3003";
owner = "did:plc:s7cesz7cr6ybltaryy4meb6y";
hostname = "knot.ocbwoy3.dev";
};
};
services.tangled-spindle = {
enable = true;
server = {
listenAddr = "0.0.0.0:3004";
owner = "did:plc:s7cesz7cr6ybltaryy4meb6y";
hostname = "spindle.ocbwoy3.dev";
};
};
services.tangled.spindle = {
enable = true;
server = {
listenAddr = "0.0.0.0:3004";
owner = "did:plc:s7cesz7cr6ybltaryy4meb6y";
hostname = "spindle.ocbwoy3.dev";
};
};
}