matrix: Switch to oci-containers config
This commit is contained in:
parent
eb9404d83c
commit
3c51268d2f
6 changed files with 80 additions and 81 deletions
|
@ -54,6 +54,10 @@
|
||||||
group = "matrix-synapse";
|
group = "matrix-synapse";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
signald-environment = {
|
||||||
|
file = ./signald/environment.age;
|
||||||
|
};
|
||||||
|
|
||||||
mosquitto-password-weewx-proxy = {
|
mosquitto-password-weewx-proxy = {
|
||||||
file = ./mosquitto/passwordWeewxProxy.age;
|
file = ./mosquitto/passwordWeewxProxy.age;
|
||||||
owner = "mosquitto";
|
owner = "mosquitto";
|
||||||
|
|
12
agenix/hosts/sail/signald/environment.age
Normal file
12
agenix/hosts/sail/signald/environment.age
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE10R3A2ZyBnOFBF
|
||||||
|
VGgxaWd4TFI3Kzc1MTVOZ3oyTkw5OUFJQ1VvejhPVFpBaG5LZlIwCnZldWd2OGNS
|
||||||
|
a3dSaEZzOWdKaHRCdjJSWXRzM3F0bFZZTEVhYWROdUVOSEkKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgTmJWNGh3IGtQMS9ubGIwaXB2SHlQV1JwUHk0T2orN1VxQ1p3THVlU1ovcW5j
|
||||||
|
VU5QUmsKdkNVbW90bVhjNW5BZkVya1ViS0lRY0kvT05IK3pNc2JJcFlWd2xxcElM
|
||||||
|
QQotPiBnLWdyZWFzZSBKbyRNY0s/Ck9QQy83OCtKNUpCYnhBCi0tLSBzNFB2eTJ5
|
||||||
|
c2p2bHhMeWdSMTBXTmoyaExST1lpZmJsSEt3UmdHbGJEZnhvCvqkLX1gUWNIX4gQ
|
||||||
|
5hj/S53ekxGqauFA0b+DZ+JxORK90CdRHvenBUeuxfqwjPwlQQXwmL2DDoTVU2qu
|
||||||
|
HlMitZrjsV8pcHm6HXOdOPBldWbpfvr1ET/rM7OEo5eW/EPqdTvsgLHjKetsra3V
|
||||||
|
4eqciGp4HlcEQPU6p9i9R0Kv
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"d /etc/container-matrix/signald 0775 0 0"
|
|
||||||
"d /etc/container-matrix/signal 0775 1337 1337"
|
|
||||||
"d /etc/container-matrix/whatsapp 0775 1337 1337"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Matrix: Signal
|
|
||||||
|
|
||||||
environment.etc."container-matrix/signal/config.yaml" = {
|
|
||||||
source = ../../secret/container/matrix/config/signal.yaml;
|
|
||||||
mode = "0640";
|
|
||||||
uid = 1337;
|
|
||||||
gid = 1337;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Matrix: WhatsApp
|
|
||||||
|
|
||||||
environment.etc."container-matrix/whatsapp/config.yaml" = {
|
|
||||||
source = ../../secret/container/matrix/config/whatsapp.yaml;
|
|
||||||
mode = "0640";
|
|
||||||
uid = 1337;
|
|
||||||
gid = 1337;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,61 +1,67 @@
|
||||||
let
|
{ config, ... }:
|
||||||
secret = import ../../secret/container/matrix;
|
|
||||||
custom-config = import ./config.nix;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
virtualisation.arion.projects.matrix.settings = {
|
virtualisation.oci-containers.containers = {
|
||||||
services = {
|
signald = {
|
||||||
signald = {
|
image = "registry.gitlab.com/signald/signald:latest";
|
||||||
service = {
|
environmentFiles = [ config.age.secrets.signald-environment.path ];
|
||||||
image = "registry.gitlab.com/signald/signald:latest";
|
volumes = [
|
||||||
container_name = "signald";
|
"/etc/container-matrix/signald:/signald"
|
||||||
restart = "unless-stopped";
|
];
|
||||||
volumes = [
|
extraOptions = [
|
||||||
"/etc/container-matrix/signald:/signald"
|
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||||
];
|
"--label=io.containers.autoupdate=registry"
|
||||||
environment = {
|
];
|
||||||
SIGNALD_DATABASE = secret.container.matrix.signald.environment.database;
|
};
|
||||||
};
|
|
||||||
labels = {
|
|
||||||
"com.centurylinklabs.watchtower.enable" = "true";
|
|
||||||
"io.containers.autoupdate" = "registry";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
matrix-signal = {
|
matrix-signal = {
|
||||||
service = {
|
image = "dock.mau.dev/mautrix/signal:latest";
|
||||||
image = "dock.mau.dev/mautrix/signal:latest";
|
dependsOn = [ "signald" ];
|
||||||
container_name = "mautrix-signal";
|
ports = [ "127.0.0.1:29328:29328" ];
|
||||||
restart = "unless-stopped";
|
volumes = [
|
||||||
depends_on = [ "signald" ];
|
"/etc/container-matrix/signal:/data"
|
||||||
ports = [ "29328:29328" ];
|
"/etc/container-matrix/signald:/signald"
|
||||||
volumes = [
|
];
|
||||||
"/etc/container-matrix/signal:/data"
|
extraOptions = [
|
||||||
"/etc/container-matrix/signald:/signald"
|
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||||
];
|
"--label=io.containers.autoupdate=registry"
|
||||||
labels = {
|
];
|
||||||
"com.centurylinklabs.watchtower.enable" = "true";
|
};
|
||||||
"io.containers.autoupdate" = "registry";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
matrix-whatsapp = {
|
matrix-whatsapp = {
|
||||||
service = {
|
image = "dock.mau.dev/mautrix/whatsapp:latest";
|
||||||
image = "dock.mau.dev/mautrix/whatsapp:latest";
|
ports = [ "127.0.0.1:29318:29318" ];
|
||||||
container_name = "mautrix-whatsapp";
|
volumes = [
|
||||||
restart = "unless-stopped";
|
"/etc/container-matrix/whatsapp:/data"
|
||||||
ports = [ "29318:29318" ];
|
];
|
||||||
volumes = [
|
extraOptions = [
|
||||||
"/etc/container-matrix/whatsapp:/data"
|
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||||
];
|
"--label=io.containers.autoupdate=registry"
|
||||||
labels = {
|
];
|
||||||
"com.centurylinklabs.watchtower.enable" = "true";
|
|
||||||
"io.containers.autoupdate" = "registry";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} // custom-config
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /etc/container-matrix/signald 0775 0 0"
|
||||||
|
"d /etc/container-matrix/signal 0775 1337 1337"
|
||||||
|
"d /etc/container-matrix/whatsapp 0775 1337 1337"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Matrix: Signal
|
||||||
|
|
||||||
|
environment.etc."container-matrix/signal/config.yaml" = {
|
||||||
|
source = ../../secret/container/matrix/config/signal.yaml;
|
||||||
|
mode = "0640";
|
||||||
|
uid = 1337;
|
||||||
|
gid = 1337;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Matrix: WhatsApp
|
||||||
|
|
||||||
|
environment.etc."container-matrix/whatsapp/config.yaml" = {
|
||||||
|
source = ../../secret/container/matrix/config/whatsapp.yaml;
|
||||||
|
mode = "0640";
|
||||||
|
uid = 1337;
|
||||||
|
gid = 1337;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
|
@ -19,6 +19,8 @@ in
|
||||||
|
|
||||||
"agenix/hosts/sail/synapse/extraConfig.age".publicKeys = sail;
|
"agenix/hosts/sail/synapse/extraConfig.age".publicKeys = sail;
|
||||||
|
|
||||||
|
"agenix/hosts/sail/signald/environment.age".publicKeys = sail;
|
||||||
|
|
||||||
"agenix/hosts/sail/mosquitto/passwordWeewxProxy.age".publicKeys = sail;
|
"agenix/hosts/sail/mosquitto/passwordWeewxProxy.age".publicKeys = sail;
|
||||||
"agenix/hosts/sail/mosquitto/passwordWeewx.age".publicKeys = sail;
|
"agenix/hosts/sail/mosquitto/passwordWeewx.age".publicKeys = sail;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue