From c5a0f138847a3f74247d6dc848d838fbc2bee999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moira=20H=C3=B6sel?= Date: Tue, 13 Dec 2022 23:52:48 +0100 Subject: [PATCH] remove lantifa: apparently dead --- hosts/parsons/configuration.nix | 1 - services/lantifa.nix | 115 -------------------------------- 2 files changed, 116 deletions(-) delete mode 100644 services/lantifa.nix diff --git a/hosts/parsons/configuration.nix b/hosts/parsons/configuration.nix index cca2b01..3ad4e00 100644 --- a/hosts/parsons/configuration.nix +++ b/hosts/parsons/configuration.nix @@ -18,7 +18,6 @@ ../../services/mail.nix ../../services/gitea.nix ../../services/nginx-pages.nix - ../../services/lantifa.nix ../../services/vaultwarden.nix ../../services/uffd.nix ../../services/netbox.nix diff --git a/services/lantifa.nix b/services/lantifa.nix deleted file mode 100644 index 2c25c26..0000000 --- a/services/lantifa.nix +++ /dev/null @@ -1,115 +0,0 @@ -{ config, lib, pkgs, profiles, modules, evalConfig, ... }: - -{ - containers.lantifa = { - autoStart = true; - privateNetwork = true; - hostAddress = "192.168.100.1"; - localAddress = "192.168.100.8"; - bindMounts = { - "/persist" = { - hostPath = "/persist/containers/lantifa"; - isReadOnly = false; - }; - }; - - path = (evalConfig {hosts = {}; groups = {};} ({ config, lib, pkgs, profiles, modules, sources, ... }: { - boot.isContainer = true; - networking.useDHCP = false; - users.users.root.hashedPassword = ""; - hexchen.bindmounts."/var/lib/mediawiki" = "/persist/var/lib/mediawiki"; - system.stateVersion = "21.05"; - - imports = [ sources.nix-hexchen.nixosModules.profiles.nopersist ]; - - - networking.hosts."127.0.0.1" = [ "wiki.lantifa.org" ]; - users.users.mediawiki.extraGroups = [ "keys" ]; - nixpkgs.config.allowUnfree = true; - networking.firewall.enable = false; - networking.defaultGateway = { - address = "192.168.100.1"; - interface = "eth0"; - }; - - services.mediawiki = { - enable = true; - name = "LANtifa"; - database.createLocally = true; - passwordFile = "/var/lib/mediawiki/mediawiki-password"; - extraConfig = let - wikidb = pkgs.fetchzip { - url = "https://www.kennel17.co.uk/uploads/testwiki/archive/e/e9/20220802220244%21WikiDB.zip"; - sha256 = "sha256-8pMNQwmGEsbIoSV1s4RL5Xqq4+f+GNOaCB8VlVnbweY="; - }; - in '' - // Configure short URLs - $wgScriptPath = ""; - $wgArticlePath = "/wiki/$1"; - $wgUsePathInfo = true; - - require_once('${wikidb}/WikiDB.php'); - $wgExtraNamespaces = array( 100 => "Table", 101 => "Table_Talk",); - $wgWikiDBNamespaces = 100; - $wgGroupPermissions['user']['writeapi'] = true; - $wgDefaultUserOptions['visualeditor-enable'] = 1; - $wgLogo = "images/c/c5/LantifaLogoFem0.3.png"; - - // PageForms config - $wgGroupPermissions['*']['viewedittab'] = false; - $wgGroupPermissions['user']['viewedittab'] = true; - - // Moderation setting - $wgModerationNotificationEnable = true; - $wgModerationEmail = "wiki_mod@lantifa.org"; - $wgLogRestrictions["newusers"] = 'moderation'; - - // intersection / DynamicPageList config - $wgDLPMaxCacheTime = 5 * 60; - ''; - - extensions = { - TemplateData = null; - VisualEditor = null; - InputBox = null; - Moderation = pkgs.fetchzip { - url = "https://github.com/edwardspec/mediawiki-moderation/archive/v1.4.20.tar.gz"; - sha256 = "1k0z44jfqsxzwy6jjz3yfibiq8wi845d5iwwh8j3yijn2854fj0i"; - }; - intersection = pkgs.fetchzip { # This is the DynamicPageList extension - url = "https://extdist.wmflabs.org/dist/extensions/intersection-REL1_36-82eb087.tar.gz"; - sha256 = "sha256-TD58DvJ4CFASP4rIc94jeB4SN4zktLe33xZtz/Qg2dk="; - }; - PageForms = pkgs.fetchzip { - url = "https://github.com/wikimedia/mediawiki-extensions-PageForms/archive/5.0.1.zip"; - sha256 = "172m7p941fbkl29h5bhanx3dn42jfmzgyvgmgm2lgdbmkawwly96"; - }; - }; - - virtualHost = { - hostName = "wiki.lantifa.org"; - listen = [ { port = 80; } ]; - adminAddr = "admin@hacc.space"; - extraConfig = '' - RewriteEngine On - RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L] - RewriteRule ^/*$ %{DOCUMENT_ROOT}/index.php [L] - ''; - }; - }; - - services.mysql.dataDir = "/persist/mysql"; - services.mysqlBackup = { - enable = true; - databases = [ "mediawiki" ]; - calendar = "*-*-* 23:45:00"; - }; - })).config.system.build.toplevel; - }; - - services.nginx.virtualHosts."wiki.lantifa.org" = { - locations."/".proxyPass = "http://" + config.containers.lantifa.localAddress + ""; - forceSSL = true; - enableACME = true; - }; -}