forked from wurzel/fruitbasket
mediawiki runs
This commit is contained in:
parent
33d823134e
commit
6aec046f12
3 changed files with 70 additions and 26 deletions
10
flake.lock
generated
10
flake.lock
generated
|
@ -87,15 +87,15 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660215038,
|
"lastModified": 1662496411,
|
||||||
"narHash": "sha256-tqMyd5QB4MZh59wMHXqpro4hkKjz9ubQxkxFSuCuBGE=",
|
"narHash": "sha256-BLzFzRQewnmzdCrcOv2f+IYQI9iY25MXBmJWHoxWynY=",
|
||||||
"owner": "NixOS",
|
"owner": "revol-xut",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "45c9736ed69800a6ff2164fb4538c9e40dad25d6",
|
"rev": "6d2d09e50ba9d12b80ed1c3be844f1d120e02682",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "revol-xut",
|
||||||
"ref": "nixos-22.05",
|
"ref": "nixos-22.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05;
|
nixpkgs.url = github:revol-xut/nixpkgs/nixos-22.05;
|
||||||
|
#nixpkgs.url = github:revol-xut/nixpkgs/master;
|
||||||
sops-nix.url = github:Mic92/sops-nix;
|
sops-nix.url = github:Mic92/sops-nix;
|
||||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
fsr-infoscreen.url = github:fsr/infoscreen;
|
fsr-infoscreen.url = github:fsr/infoscreen;
|
||||||
|
|
|
@ -6,6 +6,14 @@
|
||||||
"mediawiki/ldapprovider".owner = config.users.users.mediawiki.name;
|
"mediawiki/ldapprovider".owner = config.users.users.mediawiki.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# users.users.mediawiki.extraGroups = [ "postgres" ];
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
final.config.systemd.services.mediawiki-init.script = ''
|
||||||
|
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
services = {
|
services = {
|
||||||
mediawiki = {
|
mediawiki = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -13,25 +21,46 @@
|
||||||
passwordFile = config.sops.secrets."mediawiki/initial_admin".path;
|
passwordFile = config.sops.secrets."mediawiki/initial_admin".path;
|
||||||
database = {
|
database = {
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
socket = "/var/run/postgresql";
|
# socket = "/run/postgresql";
|
||||||
user = "mediawiki";
|
user = "mediawiki";
|
||||||
name = "mediawiki";
|
name = "mediawiki";
|
||||||
|
host = "localhost";
|
||||||
|
port = 5432;
|
||||||
|
passwordFile = config.sops.secrets."mediawiki/postgres".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# virtualHost = {
|
||||||
|
# hostName = "wiki.quitte.tassilo-tanneberger.de";
|
||||||
|
# adminAddr = "root@ifsr.de";
|
||||||
|
# forceSSL = true;
|
||||||
|
# enableACME = true;
|
||||||
|
# };
|
||||||
|
|
||||||
virtualHost = {
|
virtualHost = {
|
||||||
hostName = "wiki.quitte.tassilo-tanneberger.de";
|
hostName = "wiki.quitte.tassilo-tanneberger.de";
|
||||||
adminAddr = "root@ifsr.de";
|
adminAddr = "root@ifsr.de";
|
||||||
forceSSL = true;
|
#forceSSL = true;
|
||||||
enableACME = true;
|
#enableACME = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
virtualHost.listen = [
|
||||||
$wgArticlePath = '/$1';
|
{
|
||||||
|
ip = "127.0.0.1";
|
||||||
|
port = 8080;
|
||||||
|
ssl = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
$wgShowExceptionDetails = true;
|
extraConfig = ''
|
||||||
$wgDBserver = "${config.services.mediawiki.database.socket}";
|
$wgDBport = "5432";
|
||||||
$wgDBmwschema = "mediawiki";
|
$wgDBmwschema = "mediawiki";
|
||||||
|
|
||||||
|
$wgDBserver = "localhost";
|
||||||
|
$wgDBname = "mediawiki";
|
||||||
|
|
||||||
|
|
||||||
|
/////// $wgArticlePath = '/$1';
|
||||||
|
|
||||||
// $wgLogo = "https://www.c3d2.de/images/ck.png";
|
// $wgLogo = "https://www.c3d2.de/images/ck.png";
|
||||||
$wgEmergencyContact = "root@ifsr.de";
|
$wgEmergencyContact = "root@ifsr.de";
|
||||||
$wgPasswordSender = "root@ifsr.de";
|
$wgPasswordSender = "root@ifsr.de";
|
||||||
|
@ -87,10 +116,10 @@
|
||||||
$wgPluggableAuth_EnableLocalLogin = true;
|
$wgPluggableAuth_EnableLocalLogin = true;
|
||||||
'';
|
'';
|
||||||
extensions = {
|
extensions = {
|
||||||
Cite = pkgs.fetchzip {
|
#Cite = pkgs.fetchzip {
|
||||||
url = "https://web.archive.org/web/20220627203658/https://extdist.wmflabs.org/dist/extensions/Cite-REL1_38-d40993e.tar.gz";
|
# url = "https://web.archive.org/web/20220627203658/https://extdist.wmflabs.org/dist/extensions/Cite-REL1_38-d40993e.tar.gz";
|
||||||
sha256 = "sha256-dziMo6sH4yMPjnDtt0TXiGBxE5uGRJM+scwdeuer5sM=";
|
# sha256 = "sha256-dziMo6sH4yMPjnDtt0TXiGBxE5uGRJM+scwdeuer5sM=";
|
||||||
};
|
#};
|
||||||
CiteThisPage = pkgs.fetchzip {
|
CiteThisPage = pkgs.fetchzip {
|
||||||
url = "https://web.archive.org/web/20220627203556/https://extdist.wmflabs.org/dist/extensions/CiteThisPage-REL1_38-bb4881c.tar.gz";
|
url = "https://web.archive.org/web/20220627203556/https://extdist.wmflabs.org/dist/extensions/CiteThisPage-REL1_38-bb4881c.tar.gz";
|
||||||
sha256 = "sha256-sTZMCLlOkQBEmLiFz2BQJpWRxSDbpS40EZQ+f/jFjxI=";
|
sha256 = "sha256-sTZMCLlOkQBEmLiFz2BQJpWRxSDbpS40EZQ+f/jFjxI=";
|
||||||
|
@ -132,10 +161,10 @@
|
||||||
url = "https://web.archive.org/web/20220807185047/https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_38-126bad8.tar.gz";
|
url = "https://web.archive.org/web/20220807185047/https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_38-126bad8.tar.gz";
|
||||||
sha256 = "sha256-cdJdhj7+qisVVePuyKDu6idoUy0+gYo3zMN0y6weH84=";
|
sha256 = "sha256-cdJdhj7+qisVVePuyKDu6idoUy0+gYo3zMN0y6weH84=";
|
||||||
};
|
};
|
||||||
Scribunto = pkgs.fetchzip {
|
#Scribunto = pkgs.fetchzip {
|
||||||
url = "https://web.archive.org/web/20220627202748/https://extdist.wmflabs.org/dist/extensions/Scribunto-REL1_38-9b9271a.tar.gz";
|
# url = "https://web.archive.org/web/20220627202748/https://extdist.wmflabs.org/dist/extensions/Scribunto-REL1_38-9b9271a.tar.gz";
|
||||||
sha256 = "sha256-4sy2ZCnDFzx43WzfS4Enh+I0o0+sFl1RnNV4xGiyU0k=";
|
# sha256 = "sha256-4sy2ZCnDFzx43WzfS4Enh+I0o0+sFl1RnNV4xGiyU0k=";
|
||||||
};
|
#};
|
||||||
SyntaxHightlight = pkgs.fetchzip {
|
SyntaxHightlight = pkgs.fetchzip {
|
||||||
url = "https://web.archive.org/web/20220627203440/https://extdist.wmflabs.org/dist/extensions/SyntaxHighlight_GeSHi-REL1_38-79031cd.tar.gz";
|
url = "https://web.archive.org/web/20220627203440/https://extdist.wmflabs.org/dist/extensions/SyntaxHighlight_GeSHi-REL1_38-79031cd.tar.gz";
|
||||||
sha256 = "sha256-r1NgrhSratleQ356imxmF7KmAANvWvKpAgnLkm8IdKY=";
|
sha256 = "sha256-r1NgrhSratleQ356imxmF7KmAANvWvKpAgnLkm8IdKY=";
|
||||||
|
@ -156,6 +185,20 @@
|
||||||
"mediawiki"
|
"mediawiki"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
nginx = {
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
virtualHosts = {
|
||||||
|
"wiki.quitte.tassilo-tanneberger.de" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8080";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
systemd.services.mediawiki-pgsetup = {
|
systemd.services.mediawiki-pgsetup = {
|
||||||
description = "Prepare Mediawiki postgres database";
|
description = "Prepare Mediawiki postgres database";
|
||||||
|
|
Loading…
Add table
Reference in a new issue