diff options
author | Dennis Eriksen <d@ennis.no> | 2019-10-19 10:40:03 +0200 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2019-10-19 10:40:03 +0200 |
commit | 20f81371b55a9444fa06da1fb41501509f1411d8 (patch) | |
tree | e612f46f2fd5a182e9b5c7d543f445cad7a5c9f5 | |
download | mkosi-matrix-20f81371b55a9444fa06da1fb41501509f1411d8.tar.gz |
initial commit
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | mkosi.default | 26 | ||||
-rw-r--r-- | mkosi.nspawn | 18 | ||||
-rwxr-xr-x | mkosi.postinst | 16 | ||||
-rw-r--r-- | mkosi.skeleton/root/apache2.kanboard.conf | 20 | ||||
-rw-r--r-- | mkosi.skeleton/root/apache2.mpm_prefork.conf | 16 | ||||
-rw-r--r-- | mkosi.skeleton/root/apache2.ports.conf | 4 |
7 files changed, 102 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3dff6a2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# mkosi cache +mkosi.cache/* diff --git a/mkosi.default b/mkosi.default new file mode 100644 index 0000000..18dbcc8 --- /dev/null +++ b/mkosi.default @@ -0,0 +1,26 @@ +[Distribution] +Distribution=ubuntu +Release=bionic +Repositories=main,universe +Mirror=http://no.archive.ubuntu.com + +[Output] +Format=directory +Output=/var/lib/machines/matrix + +[Packages] +WithNetwork=yes +Packages= + iputils-ping + vim + curl + iproute2 + dnsutils + net-tools + ca-certificates + locales + openssl + vim + wget + lsb-release + apt-transport-https diff --git a/mkosi.nspawn b/mkosi.nspawn new file mode 100644 index 0000000..daaf6f3 --- /dev/null +++ b/mkosi.nspawn @@ -0,0 +1,18 @@ +[Exec] +Hostname=matrix +ResolvConf=copy-host +Timezone=copy +PrivateUsers=pick +NoNewPrivileges=yes + +[Files] +PrivateUsersChown=yes +BindReadOnly=/etc/matrix-synapse/conf.d +BindReadOnly=/etc/matrix-synapse/homeserver.yaml +BindReadOnly=/etc/matrix-synapse/homeserver.signing.key +BindReadOnly=/etc/matrix-synapse/log.yaml +Bind=/var/local/matrix/matrix-synapse:/var/lib/matrix-synapse + +[Network] +VirtualEthernet=no + diff --git a/mkosi.postinst b/mkosi.postinst new file mode 100755 index 0000000..b360d24 --- /dev/null +++ b/mkosi.postinst @@ -0,0 +1,16 @@ +#!/bin/sh +set -ex + +export DEBIAN_FRONTEND=noninteractive + +# locales +sed -i 's/# en_IE.UTF-8 UTF-8/en_IE.UTF-8 UTF-8/' /etc/locale.gen +locale-gen + +# get matrix gpg-key +wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/matrix-org.list + +apt-get update +apt-get install --yes matrix-synapse-py3 +rm -r /etc/matrix-synapse/* diff --git a/mkosi.skeleton/root/apache2.kanboard.conf b/mkosi.skeleton/root/apache2.kanboard.conf new file mode 100644 index 0000000..53454a1 --- /dev/null +++ b/mkosi.skeleton/root/apache2.kanboard.conf @@ -0,0 +1,20 @@ +<VirtualHost *:8302> + + ServerName kanboard.dnns.no + UseCanonicalName on + + DocumentRoot /var/www/kanboard + DirectoryIndex index.php index.html + + # To cirkumvent phps $_SERVER['HTTPS']-check + SetEnv HTTPS "on" + + AcceptPathInfo On + + # Trust the remote user forwarded by nginx + SetEnvIf X-Forwarded-User (.*) REMOTE_USER=$1 + +</VirtualHost> + + + diff --git a/mkosi.skeleton/root/apache2.mpm_prefork.conf b/mkosi.skeleton/root/apache2.mpm_prefork.conf new file mode 100644 index 0000000..73ceafc --- /dev/null +++ b/mkosi.skeleton/root/apache2.mpm_prefork.conf @@ -0,0 +1,16 @@ +# prefork MPM +# StartServers: number of server processes to start +# MinSpareServers: minimum number of server processes which are kept spare +# MaxSpareServers: maximum number of server processes which are kept spare +# MaxRequestWorkers: maximum number of server processes allowed to start +# MaxConnectionsPerChild: maximum number of requests a server process serves + +<IfModule mpm_prefork_module> + StartServers 1 + MinSpareServers 1 + MaxSpareServers 10 + MaxRequestWorkers 75 + MaxConnectionsPerChild 0 +</IfModule> + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/mkosi.skeleton/root/apache2.ports.conf b/mkosi.skeleton/root/apache2.ports.conf new file mode 100644 index 0000000..b750446 --- /dev/null +++ b/mkosi.skeleton/root/apache2.ports.conf @@ -0,0 +1,4 @@ +Listen 127.0.0.1:8302 +Listen [::1]:8302 + +# vim: syntax=apache ts=4 sw=4 sr noet |