Matrix container working

This commit is contained in:
Greg Hellings
2024-02-29 11:36:25 -06:00
parent b536a7e3ef
commit ea4a5a6d41
2 changed files with 23 additions and 3 deletions
+22 -2
View File
@@ -5,9 +5,23 @@ let
conn = "postgresql:///dendrite?sslmode=disable&host=/run/postgresql";
in
{
systemd.services."container@matrix".serviceConfig = {
DeviceAllow = [ "/dev/net/tun" ];
ProtectKernelModules = false;
PrivateDevices = false;
};
containers.matrix = {
autoStart = true;
bindMounts."/etc/ssh".hostPath = "/etc/ssh";
bindMounts = {
"/etc/ssh".hostPath = "/etc/ssh";
"/dev/net/tun" = {
hostPath = "/dev/net/tun";
isReadOnly = false;
};
};
hostAddress = "192.168.204.1";
localAddress = "192.168.204.2";
privateNetwork = true;
config = { pkgs, config, ... }: {
imports = [
inputs.agenix.nixosModules.default
@@ -31,6 +45,10 @@ in
file = ../../secrets/dendrite.age;
owner = "dendrite";
};
secrets.dendrite_key = {
file = ../../secrets/dendrite_key.age;
owner = "dendrite";
};
};
users.users.dendrite = {
@@ -48,6 +66,8 @@ in
tailscale.enable = true;
};
#services.tailscale.interfaceName = "userspace-networking";
services.dendrite = {
enable = true;
environmentFile = config.age.secrets.dendrite.path;
@@ -83,7 +103,7 @@ in
"jupiterbroadcasting.com"
];
# Generate this with {path-to-dendrite}/bin/generate-keys --private-key /etc/dendrite.pem
private_key = "/etc/dendrite.pem";
private_key = config.age.secrets.dendrite_key.path;
};
client_api = {
registration_enabled = false;
+1 -1
View File
@@ -55,7 +55,7 @@ in {
greg.backup.jobs.greg-postgresql-backup = {
src = config.services.postgresqlBackup.location;
dest = "linode-postgres";
dest = "database-${config.networking.hostName}";
user = "postgres";
};
};