ctucx.git: nixfiles

ctucx' nixfiles

commit 995d0188c640fbd9d6767ae146ca6220c5bade99
parent 3c29a5ab8660d0db7f15b4d2ff2831eee4059685
Author: Leah (ctucx) <git@ctu.cx>
Date: Mon, 3 Jul 2023 21:39:35 +0200

machines/trabbi: remove pleroma
3 files changed, 0 insertions(+), 270 deletions(-)
M
machines/trabbi/configuration.nix
|
1
-
D
machines/trabbi/pleroma/config.exs
|
195
-------------------------------------------------------------------------------
D
machines/trabbi/pleroma/default.nix
|
74
--------------------------------------------------------------------------
diff --git a/machines/trabbi/configuration.nix b/machines/trabbi/configuration.nix
@@ -17,7 +17,6 @@
     ./grafana
 
     # communication
-    #./pleroma
     ./gotosocial.nix
     ./matrix-synapse.nix
     ./mail.nix
diff --git a/machines/trabbi/pleroma/config.exs b/machines/trabbi/pleroma/config.exs
@@ -1,195 +0,0 @@
-import Config
-
-config :pleroma, :dangerzone, override_repo_pool_size: true
-
-config :pleroma, Pleroma.Web.Endpoint,
-  url: [host: "pleroma.ctu.cx", scheme: "https", port: 443],
-  domain: "ctu.cx",
-  http: [ip: {127, 0, 0, 1}, port: 4000]
-
-config :pleroma, Pleroma.Repo,
-  adapter:    Ecto.Adapters.Postgres,
-  username:   "pleroma",
-  database:   "pleroma",
-  socket_dir: "/run/postgresql",
-  pool_size: 10,
-  queue_target: 5000,
-  timeout: 20_000,
-  connect_timeout: 20_000
-
-config :pleroma, :database, rum_enabled: false
-
-# Configure web push notifications
-config :web_push_encryption, :vapid_details, subject: "mailto:pleroma@ctu.cx"
-
-config :pleroma, :instance, static_dir: "/var/lib/pleroma/static"
-config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads"
-
-config :pleroma, :static_fe, enabled: false
-
-config :pleroma, :frontend_configurations,
-  pleroma_fe: %{
-    theme: "breezy-dark",
-    background: "/static/bg.png",
-    logo: "/static/logo.png",
-    nsfwCensorImage: "/static/nsfw.png",
-    logoLeft: true,
-    chatDisabled: true,
-    webPushNotifications: true,
-    showFeaturesPanel: false,
-    collapseMessageWithSubject: false,
-    hideUserStats: false
-  }
-
-config :pleroma, :instance,
-  name: "ctucx.pleroma",
-  email: "pleroma@ctu.cx",
-  limit: 5000,
-  registrations_open: false,
-  public: false,
-  invites_enabled: false,
-  account_activation_required: false,
-  remote_post_retention_days: 1,
-  external_user_synchronization: false,
-  allowed_post_formats: [
-    "text/plain",
-    "text/html",
-    "text/markdown"
-  ],
-  quarantined_instances: [
-    "search.fedi.app",
-    "freespeechextremist.com",
-    "gleasonator.com",
-    "gab.com",
-    "gab.ai",
-    "spinster.xyz",
-    "clubcyberia.co",
-    "glowers.club",
-    "shitposter.club",
-    "social.urspringer.de",
-    "pleroma.soykaf.com",
-    "nnia.space",
-    "kiwifarms.cc",
-    "wintermute.fr.to",
-    "anitwitter.moe",
-    "brighteon.social",
-    "cawfee.club",
-    "freefedifollowers.ga",
-    "glindr.org",
-    "humblr.social",
-    "jaeger.website",
-    "libre.tube",
-    "newjack.city",
-    "pawoo.net",
-    "pieville.net",
-    "play.xmr.101010.pl",
-    "skippers-bin.com",
-    "sneak.berlin",
-    "yggdrasil.social",
-    "anime.website",
-    "collapsitarian.io",
-    "bajax.us",
-    "nicecrew.digital",
-    "shortstackran.ch",
-    "kys.moe",
-    "beefyboys.win",
-    "detroitriotcity.com"
-  ]
-
-config :pleroma, :media_proxy,
-  enabled: false,
-  redirect_on_failure: true,
-  base_url: "https://cache.domain.tld"
-
-config :pleroma, :fetch_initial_posts,
-  enabled: false,
-  pages: 1
-
-config :pleroma, :shout, enabled: false
-
-config :pleroma, :mrf,
-  policies: [Pleroma.Web.ActivityPub.MRF.SimplePolicy]
-
-config :pleroma, :mrf_simple,
-  reject: [
-    "search.fedi.app",
-    "freespeechextremist.com",
-    "gleasonator.com",
-    "gab.com",
-    "gab.ai",
-    "spinster.xyz",
-    "clubcyberia.co",
-    "glowers.club",
-    "shitposter.club",
-    "social.urspringer.de",
-    "pleroma.soykaf.com",
-    "nnia.space",
-    "kiwifarms.cc",
-    "wintermute.fr.to",
-    "anitwitter.moe",
-    "brighteon.social",
-    "cawfee.club",
-    "freefedifollowers.ga",
-    "glindr.org",
-    "humblr.social",
-    "jaeger.website",
-    "libre.tube",
-    "newjack.city",
-    "pawoo.net",
-    "pieville.net",
-    "play.xmr.101010.pl",
-    "skippers-bin.com",
-    "sneak.berlin",
-    "yggdrasil.social",
-    "anime.website",
-    "collapsitarian.io",
-    "bajax.us",
-    "nicecrew.digital",
-    "shortstackran.ch",
-    "kys.moe",
-    "beefyboys.win",
-    "detroitriotcity.com"
-  ]
-
-config :pleroma, :frontends,
-  primary: %{
-    "name" => "pleroma",
-    "ref" => "stable"
-  },
-  admin: %{
-    "name" => "admin",
-    "ref" => "develop"
-  },
-  fedife: %{
-    "name" => "fedi-fe",
-    "ref" => "master"
-  },
-  kenoma: %{
-    "name" => "kenoma",
-    "ref" => "master"
-  }
-
-config :pleroma, :emoji,
-  shortcode_globs: ["/emoji/custom/**/*.png"],
-  groups: [
-    "Anarchy":        "/emoji/anarchy/*.png",
-    "Blobs":          "/emoji/blob/*.png",
-    "Blobcat":        "/emoji/blobcat/*.png",
-    "Catgirl":        "/emoji/catgirl/*.png",
-    "Chaos":          "/emoji/chaos/*.png",
-    "Comfy Blobcat":  "/emoji/comfyblobcat/*.png",
-    'etc':            "/emoji/etc/*.png",
-    "Flags":          "/emoji/flags/*.png",
-    "Flauschehorn":   "/emoji/flauschehorn/*.png",
-    "Hacker ABC":     "/emoji/hackerabc/*.png",
-    "Hearts":         "/emoji/heart/*.png",
-    "Logos":          "/emoji/logos/*.png",
-    "Menhera":        "/emoji/menhera/*.png",
-    "Queer":          "/emoji/queer/*.png",
-    "Signals":        "/emoji/signals/*.png",
-    "Trains":         "/emoji/trains/*.png"
-  ]
-
-config :pleroma, configurable_from_database: false
-
-config :pleroma, Pleroma.Upload, filters: [Pleroma.Upload.Filter.Exiftool, Pleroma.Upload.Filter.AnonymizeFilename, Pleroma.Upload.Filter.Dedupe]
diff --git a/machines/trabbi/pleroma/default.nix b/machines/trabbi/pleroma/default.nix
@@ -1,74 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-
-  age.secrets.restic-pleroma.file = ../../../secrets/trabbi/restic/pleroma.age;
-
-  restic-backups.pleroma = {
-    user              = "pleroma";
-    passwordFile      = config.age.secrets.restic-pleroma.path;
-    paths             = [ "/var/lib/pleroma" ];
-    postgresDatabases = [ "pleroma" ];
-  };
-
-  dns.zones."ctu.cx".subdomains.pleroma.CNAME = [ "${config.networking.fqdn}." ];
-
-  systemd.services = {
-    pleroma = {
-      path      = [ pkgs.exiftool ];
-      onFailure = [ "email-notify@%i.service" ];
-    };
-
-    pleroma-cleanup = {
-      startAt                    = "*-*-* 3:00:00";
-      path                       = with pkgs; [ gawk ];
-      onFailure                  = [ "email-notify@%i.service" ];
-      environment.RELEASE_COOKIE = "/var/lib/pleroma/.cookie";
-      serviceConfig.Type         = "oneshot";
-      serviceConfig.User         = config.services.pleroma.user;
-      serviceConfig.Group        = config.services.pleroma.group;
-      serviceConfig.ExecStart    = "${pkgs.pleroma}/bin/pleroma_ctl database prune_objects --vacuum";
-    };
-  };
-
-  services = {
-    postgresql = {
-      enable          = true;
-      ensureDatabases = [ "pleroma" ];
-      ensureUsers     = [
-        {
-          name = "pleroma";
-          ensurePermissions."DATABASE pleroma" = "ALL PRIVILEGES";
-        }
-      ];
-    };
-
-    pleroma = {
-      enable           = true;
-      configs          = [ (lib.fileContents ./config.exs) ];
-      secretConfigFile = "/var/lib/pleroma/secret.exs";
-    };
-
-    nginx = {
-      enable = true;
-      virtualHosts = {
-        "pleroma.ctu.cx" = {
-          enableACME = true;
-          forceSSL   = true;
-          kTLS       = true;
-          locations."/" = {
-            proxyPass       = "http://127.0.0.1:4000/";
-            proxyWebsockets = true;
-          };
-        };
-        "ctu.cx" = {
-          enableACME = true;
-          forceSSL   = true;
-          kTLS       = true;
-          locations."/.well-known/host-meta".extraConfig = "return 301 https://pleroma.ctu.cx$request_uri;";
-        };
-      };
-    };
-  };
-
-}