katzen-cafe/modules/containers/phtanumb-wiki.nix

41 lines
1,001 B
Nix
Raw Normal View History

2023-04-26 21:25:04 +00:00
{ pkgs, ... }:
{
containers."phtanumb-wiki" = {
autoStart = true;
localAddress = "127.0.0.1";
bindMounts = {
"/var/mediawiki" = {
hostPath = "/phtanum-b/wiki";
isReadOnly = false;
};
};
config = { config, pkgs, ... }: {
services.mediawiki = {
enable = true;
name = "phtanum-b";
virtualHost.listen = [
{
ip = "127.0.0.1";
port = 8080;
ssl = false;
}
];
virtualHost.hostName = "wiki.phtanum-b.katzen.cafe";
virtualHost.adminAddr = "admin@katzen.cafe";
passwordFile = "/var/mediawiki/passwordFile";
extraConfig = ''
# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;
'';
};
system.stateVersion = "22.11";
};
};
deployment.keys."passwordFile" = {
keyCommand = [ "cat" "/home/jade/keys/phtanumb-wiki/passwordFile" ];
destDir = "/var/mediawiki";
};
}