Matrix container working
This commit is contained in:
+22
-2
@@ -5,9 +5,23 @@ let
|
|||||||
conn = "postgresql:///dendrite?sslmode=disable&host=/run/postgresql";
|
conn = "postgresql:///dendrite?sslmode=disable&host=/run/postgresql";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
systemd.services."container@matrix".serviceConfig = {
|
||||||
|
DeviceAllow = [ "/dev/net/tun" ];
|
||||||
|
ProtectKernelModules = false;
|
||||||
|
PrivateDevices = false;
|
||||||
|
};
|
||||||
containers.matrix = {
|
containers.matrix = {
|
||||||
autoStart = true;
|
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, ... }: {
|
config = { pkgs, config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
@@ -31,6 +45,10 @@ in
|
|||||||
file = ../../secrets/dendrite.age;
|
file = ../../secrets/dendrite.age;
|
||||||
owner = "dendrite";
|
owner = "dendrite";
|
||||||
};
|
};
|
||||||
|
secrets.dendrite_key = {
|
||||||
|
file = ../../secrets/dendrite_key.age;
|
||||||
|
owner = "dendrite";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.dendrite = {
|
users.users.dendrite = {
|
||||||
@@ -48,6 +66,8 @@ in
|
|||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#services.tailscale.interfaceName = "userspace-networking";
|
||||||
|
|
||||||
services.dendrite = {
|
services.dendrite = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environmentFile = config.age.secrets.dendrite.path;
|
environmentFile = config.age.secrets.dendrite.path;
|
||||||
@@ -83,7 +103,7 @@ in
|
|||||||
"jupiterbroadcasting.com"
|
"jupiterbroadcasting.com"
|
||||||
];
|
];
|
||||||
# Generate this with {path-to-dendrite}/bin/generate-keys --private-key /etc/dendrite.pem
|
# 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 = {
|
client_api = {
|
||||||
registration_enabled = false;
|
registration_enabled = false;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ in {
|
|||||||
|
|
||||||
greg.backup.jobs.greg-postgresql-backup = {
|
greg.backup.jobs.greg-postgresql-backup = {
|
||||||
src = config.services.postgresqlBackup.location;
|
src = config.services.postgresqlBackup.location;
|
||||||
dest = "linode-postgres";
|
dest = "database-${config.networking.hostName}";
|
||||||
user = "postgres";
|
user = "postgres";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user