mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(postgresql): enable backup
This commit is contained in:
@@ -43,7 +43,7 @@ in {
|
||||
passwordFile = toString <secrets/restic/password>;
|
||||
paths = [
|
||||
"/var/lib/codimd"
|
||||
"/var/lib/postgresql"
|
||||
config.services.postgresqlBackup.location
|
||||
"/var/lib/weechat"
|
||||
"/var/lib/nextcloud"
|
||||
"/var/lib/grafana"
|
||||
|
||||
@@ -65,13 +65,18 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = [config.services.nextcloud.config.dbname];
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = ["nextcloud"];
|
||||
ensureDatabases = [config.services.nextcloud.config.dbname];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "nextcloud";
|
||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||
ensurePermissions."DATABASE ${config.services.nextcloud.config.dbname}" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
domain = "feed.kmein.de";
|
||||
@@ -17,6 +18,11 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = [config.services.tt-rss.database.name];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
@@ -14,6 +14,11 @@ in {
|
||||
];
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = ["atuin"];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
type = "d";
|
||||
|
||||
Reference in New Issue
Block a user