forked from katzen-cafe/katzen-cafe
continuing things
This commit is contained in:
parent
6c2fea3b2f
commit
bce60dc872
9 changed files with 156 additions and 45 deletions
7
modules/containers/default.nix
Normal file
7
modules/containers/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./postgres.nix
|
||||
./phtanumb-wiki.nix
|
||||
];
|
||||
}
|
40
modules/containers/phtanumb-wiki.nix
Normal file
40
modules/containers/phtanumb-wiki.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ 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";
|
||||
};
|
||||
}
|
32
modules/containers/postgres.nix
Normal file
32
modules/containers/postgres.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
containers.postgres = {
|
||||
autoStart = true;
|
||||
localAddress = "127.0.0.1";
|
||||
bindMounts = {
|
||||
"/var/lib/postgresql" = {
|
||||
hostPath = "/postgres";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
config = { config, pkgs, ... }: {
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "keycloak";
|
||||
ensurePermissions = {
|
||||
"DATABASE \"nextcloud\"" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
ensureDatabases = [
|
||||
"keycloak"
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue