Compare commits

...

2 commits

Author SHA1 Message Date
60f5dfdc10
admin-fe: disable unused features 2024-11-14 19:14:01 +01:00
f436f8fcdb
florp: move moderation into its own repo 2024-11-14 19:13:55 +01:00
6 changed files with 72 additions and 47 deletions

View file

@ -1,5 +1,10 @@
{ config, inputs, lib, pkgs, ... }: { { config, inputs, lib, pkgs, ... }: {
sops.secrets."services/akkoma/mailerPassword" = { imports = [
inputs.florp-moderation.nixosModules.default
# Moderated instances. See https://woof.rip/florp/moderation for more information.
inputs.florp-moderation.nixosModules.florp
];
sops.secrets."services/akkoma/mailerPassword" = {
sopsFile = ../../../secrets/services/akkoma.yaml; sopsFile = ../../../secrets/services/akkoma.yaml;
}; };
sops.secrets."services/akkoma/deepl" = { sops.secrets."services/akkoma/deepl" = {
@ -44,16 +49,14 @@
ref = "5f0339ce00"; ref = "5f0339ce00";
}; };
admin = { admin = {
package = pkgs.akkoma-frontends.admin-fe; package = pkgs.akkoma-admin-fe;
name = "admin-fe"; name = "admin-fe";
ref = "stable"; ref = "stable";
}; };
}; };
}; };
services.akkoma.config = let services.akkoma.config = let
inherit ((pkgs.formats.elixirConf { }).lib) mkRaw mkAtom mkTuple; inherit ((pkgs.formats.elixirConf { }).lib) mkRaw mkAtom;
mapAttrsToListOfTuple = attr: lib.mapAttrsToList (name: value: mkTuple [ name value ]) attr;
mkMapOfPredefinedKeys = set: let mkMapOfPredefinedKeys = set: let
string = value: "\"${(lib.escape [ "\\" "#" "\"" ]) value}\""; string = value: "\"${(lib.escape [ "\\" "#" "\"" ]) value}\"";
@ -150,45 +153,9 @@
]; ];
":mrf".policies = map mkRaw [ ":mrf".policies = map mkRaw [
"Pleroma.Web.ActivityPub.MRF.SimplePolicy"
"Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy"
"Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy" "Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy"
]; ];
":mrf_simple" = {
reject = mapAttrsToListOfTuple {
"bae.st" = "transphobia, queerphobia";
"brighteon.social" = "transphobia, rightwing extremism";
"detroitriotcity.com" = "transphobia, queerphobia";
"freeatlantis.com" = "harassment";
"freespeechextremist.com" = "N/A";
"gab.com" = "N/A";
"gleasonator.com" = "transphobia";
"kitsunemimi.club" = "transphobia";
"kiwifarms.*" = "harassment";
"poa.st" = "queerphobia, racism, rightwing extremism";
"seal.cafe" = "transphobia";
"social.quodverum.com" = "N/A";
"spinster.xyz" = "transphobia";
"truthsocial.co.in" = "N/A";
"varishangout.net" = "transphobia";
"activitypub-troll.cf" = "N/A";
"misskey-forkbomb.cf" = "security";
"repl.co" = "N/A";
"rape.pet" = "CSAM";
"childlove.space" = "CSAM";
"pedo.school" = "CSAM";
"loli.church" = "transphobia";
"usasa.ky" = "spam";
"tickler.cc" = "spam";
"shitposter.club" = "transphobia";
};
followers_only = mapAttrsToListOfTuple {
"bitcoinhackers.org" = "annoying";
};
};
":mrf_object_age".threshold = 180 * 24 * 3600; ":mrf_object_age".threshold = 180 * 24 * 3600;
":frontend_configurations" = { ":frontend_configurations" = {

View file

@ -437,11 +437,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731279732, "lastModified": 1731582952,
"narHash": "sha256-eZllHPzbjvTNrzImqtDrs0k1LsIIeTlp8MMN9SxMvvE=", "narHash": "sha256-hnvqHeekGal+hml6BQB254LsJn+Vk5QNKzkIu8rH/xs=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "2f1130b23576a403b9b1d70d6431649bfa044621", "rev": "f283dba73f777746e1675126f8fa4c5b1fd06152",
"revCount": 8, "revCount": 10,
"type": "git", "type": "git",
"url": "https://woof.rip/florp/about.git" "url": "https://woof.rip/florp/about.git"
}, },
@ -470,6 +470,26 @@
"url": "https://woof.rip/florp/branding.git" "url": "https://woof.rip/florp/branding.git"
} }
}, },
"florp-moderation": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1731607870,
"narHash": "sha256-zWCDVjtia0h/sCMUrmuedhxB/DgG2EkYwpviL1etcLU=",
"ref": "refs/heads/main",
"rev": "f8765b410ad0496a82cc294c68aec701e6d391be",
"revCount": 5,
"type": "git",
"url": "https://woof.rip/florp/moderation.git"
},
"original": {
"type": "git",
"url": "https://woof.rip/florp/moderation.git"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1038,6 +1058,7 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"florp-about": "florp-about", "florp-about": "florp-about",
"florp-branding": "florp-branding", "florp-branding": "florp-branding",
"florp-moderation": "florp-moderation",
"home-manager": "home-manager", "home-manager": "home-manager",
"hydra": "hydra", "hydra": "hydra",
"kyouma-www": "kyouma-www", "kyouma-www": "kyouma-www",

View file

@ -21,12 +21,16 @@
url = "github:wobcom/fernglas"; url = "github:wobcom/fernglas";
inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.follows = "flake-utils";
}; };
florp-about = {
url = "git+https://woof.rip/florp/about.git";
inputs.nixpkgs.follows = "nixpkgs";
};
florp-branding = { florp-branding = {
url = "git+https://woof.rip/florp/branding.git"; url = "git+https://woof.rip/florp/branding.git";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
florp-about = { florp-moderation = {
url = "git+https://woof.rip/florp/about.git"; url = "git+https://woof.rip/florp/moderation.git";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager = { home-manager = {

View file

@ -0,0 +1,7 @@
{
akkoma-frontends
}:
akkoma-frontends.admin-fe.overrideAttrs {
patches = [ ./disable-options.patch ];
}

View file

@ -0,0 +1,25 @@
diff --git a/config/index.js b/config/index.js
index 4bc47744..ceb1bbd5 100644
--- a/config/index.js
+++ b/config/index.js
@@ -18,7 +18,7 @@ module.exports = {
host: 'localhost',
port: 9527, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
- errorOverlay: true,
+ errorOverlay: false,
notifyOnErrors: false,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
diff --git a/config/prod.env.js b/config/prod.env.js
index 7acb93a2..ea500e99 100644
--- a/config/prod.env.js
+++ b/config/prod.env.js
@@ -2,6 +2,6 @@ module.exports = {
NODE_ENV: '"production"',
ENV_CONFIG: '"prod"',
BASE_API: '"https://api-prod"',
- DISABLED_FEATURES: '[""]',
+ DISABLED_FEATURES: '["settings","media-proxy-cache","relays"]',
ASSETS_PUBLIC_PATH: '/pleroma/admin/'
}

View file

@ -6,6 +6,7 @@ final: prev: {
librespeed-rust = final.callPackage ./librespeed-rust/default.nix {}; librespeed-rust = final.callPackage ./librespeed-rust/default.nix {};
librespeed-go = final.callPackage ./librespeed-go/default.nix {}; librespeed-go = final.callPackage ./librespeed-go/default.nix {};
akkoma-fe-domi = final.callPackage ./akkoma-fe-domi/default.nix {}; akkoma-fe-domi = final.callPackage ./akkoma-fe-domi/default.nix {};
akkoma-admin-fe = final.callPackage ./akkoma-admin-fe/default.nix {};
nginxQuic = prev.nginxQuic.override { nginxQuic = prev.nginxQuic.override {
withSlice = true; withSlice = true;
# Use zlib because zlib-ng uses larger buffers then nginx preallocates. # Use zlib because zlib-ng uses larger buffers then nginx preallocates.