feat: format and fix noisebell config

This commit is contained in:
Jet 2026-03-23 00:04:46 -07:00
parent 3e78c835cc
commit d0b29c1244
No known key found for this signature in database
10 changed files with 211 additions and 101 deletions

View file

@ -43,7 +43,7 @@
}
'';
};
"git.extremist.software" = {
extraConfig = ''
rate_limit {
@ -102,7 +102,7 @@
reverse_proxy localhost:3001 # Grafana
'';
};
"uptime.extremist.software" = {
extraConfig = ''
rate_limit {
@ -129,7 +129,6 @@
'';
};
"matrix.extremist.software" = {
extraConfig = ''
rate_limit {

View file

@ -5,7 +5,7 @@
enable = true;
# Let stalwart open its own ports if needed for the main services
openFirewall = true;
settings = {
server = {
hostname = "extremist.software";
@ -40,7 +40,7 @@
cert = "%{file:/var/lib/acme/extremist.software/fullchain.pem}%";
private-key = "%{file:/var/lib/acme/extremist.software/key.pem}%";
};
authentication.fallback-admin = {
user = "admin";
secret = "%{file:/run/agenix/stalwart-admin}%";

View file

@ -7,7 +7,7 @@
settings = {
server_name = "extremist.software";
public_baseurl = "https://matrix.extremist.software";
listeners = [
{
port = 8008;
@ -17,13 +17,16 @@
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
names = [
"client"
"federation"
];
compress = false;
}
];
}
];
enable_registration = false;
database = {
name = "psycopg2";
@ -42,10 +45,11 @@
services.postgresql = {
enable = true;
ensureDatabases = [ "matrix-synapse" ];
ensureUsers = [{
name = "matrix-synapse";
ensureDBOwnership = true;
}];
ensureUsers = [
{
name = "matrix-synapse";
ensureDBOwnership = true;
}
];
};
}

View file

@ -15,9 +15,11 @@
scrapeConfigs = [
{
job_name = "node";
static_configs = [{
targets = [ "127.0.0.1:9100" ];
}];
static_configs = [
{
targets = [ "127.0.0.1:9100" ];
}
];
}
];
};

View file

@ -1,4 +1,4 @@
{ ... }:
{ config, ... }:
{
services.noisebell-cache = {
@ -6,6 +6,12 @@
port = 3005;
domain = "noisebell.extremist.software";
piAddress = "http://noisebell-pi";
outboundWebhooks = [
{
url = "http://127.0.0.1:3004/webhook";
secretFile = config.age.secrets.noisebell-discord-webhook-secret.path;
}
];
};
services.noisebell-discord = {

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
services.ntfy-sh = {
@ -19,13 +24,15 @@
# Patch the generated config at runtime to inject the admin bcrypt hash
systemd.services.ntfy-sh = {
serviceConfig.RuntimeDirectory = "ntfy-sh";
serviceConfig.ExecStartPre = let
script = pkgs.writeShellScript "ntfy-patch-config" ''
cp /etc/ntfy/server.yml /run/ntfy-sh/server.yml
HASH=$(cat ${config.age.secrets.ntfy-admin-hash.path})
printf '\nauth-users:\n - "jet:%s:admin"\n' "$HASH" >> /run/ntfy-sh/server.yml
'';
in [ "+${script}" ];
serviceConfig.ExecStartPre =
let
script = pkgs.writeShellScript "ntfy-patch-config" ''
cp /etc/ntfy/server.yml /run/ntfy-sh/server.yml
HASH=$(cat ${config.age.secrets.ntfy-admin-hash.path})
printf '\nauth-users:\n - "jet:%s:admin"\n' "$HASH" >> /run/ntfy-sh/server.yml
'';
in
[ "+${script}" ];
serviceConfig.ExecStart = lib.mkForce "${pkgs.ntfy-sh}/bin/ntfy serve --config /run/ntfy-sh/server.yml";
};
}

View file

@ -16,15 +16,48 @@
request_timeout = 1.5;
};
ui = {
categories_as_tabs = [ "general" "images" ];
categories_as_tabs = [
"general"
"images"
];
};
engines = [
{ name = "google"; engine = "google"; categories = "general"; disabled = false; }
{ name = "wikipedia"; engine = "wikipedia"; categories = "general"; disabled = false; }
{ name = "google images"; engine = "google_images"; categories = "images"; disabled = false; }
{ name = "duckduckgo images"; engine = "duckduckgo_images"; categories = "images"; disabled = false; }
{ name = "bing images"; engine = "bing_images"; categories = "images"; disabled = false; }
{ name = "qwant images"; engine = "qwant_images"; categories = "images"; disabled = false; }
{
name = "google";
engine = "google";
categories = "general";
disabled = false;
}
{
name = "wikipedia";
engine = "wikipedia";
categories = "general";
disabled = false;
}
{
name = "google images";
engine = "google_images";
categories = "images";
disabled = false;
}
{
name = "duckduckgo images";
engine = "duckduckgo_images";
categories = "images";
disabled = false;
}
{
name = "bing images";
engine = "bing_images";
categories = "images";
disabled = false;
}
{
name = "qwant images";
engine = "qwant_images";
categories = "images";
disabled = false;
}
];
};
};