Add monica

This commit is contained in:
Greg Hellings
2023-09-07 23:47:24 +00:00
parent 84590364fe
commit 85dde96c15
5 changed files with 260 additions and 3 deletions
+1
View File
@@ -5,6 +5,7 @@
./git.nix
./hardware-configuration.nix
./podman.nix
./monica.nix
./nextcloud.nix
./nginx.nix
./postgres.nix
+28
View File
@@ -0,0 +1,28 @@
{ config, ... }:
{
services.monica = {
enable = true;
appKeyFile = config.age.secrets.monica.path;
appURL = "https://people.thehellings.com";
database = {
port = 5432;
};
nginx = {
addSSL = true;
enableACME = true;
serverAliases = [ "people.thehellings.com" ];
};
};
age.secrets.monica = {
file = ../../secrets/monica.age;
owner = "monica";
};
greg.backup.jobs.monica = {
src = "/var/lib/monica";
dest = "monica";
user = "monica";
};
}
+12 -3
View File
@@ -4,7 +4,12 @@
services.postgresql = {
enable = true;
checkConfig = true;
ensureDatabases = [ "nextcloud" "gitea" "dendrite" ];
ensureDatabases = [
"dendrite"
"gitea"
"monica"
"nextcloud"
];
#initialScript = pkgs.writeText "create-matrix-db.sql" ''
# CREATE ROLE "matrix-synapse" WITH LOGIN;
# CREATE DATABASE "synapse" WITH OWNER "matrix-synapse" TEMPLATE template0 LC_COLLATE = "C" LC_CTYPE = "C";
@@ -22,6 +27,9 @@
} {
name = "dendrite";
ensurePermissions."DATABASE dendrite" = "ALL PRIVILEGES";
} {
name = "monica";
ensurePermissions."DATABASE monica" = "ALL PRIVILEGES";
} ];
settings = {
log_connections = true;
@@ -37,9 +45,10 @@ root root postgres
services.postgresqlBackup = {
enable = true;
databases = [
"gitea"
"nextcloud"
"dendrite"
"gitea"
"monica"
"nextcloud"
];
};