postgres: enable backups

This commit is contained in:
Serĉanto de Scio 2022-06-23 08:50:22 +10:00
parent 5dcefef47f
commit 4b89840421
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA
7 changed files with 35 additions and 1 deletions

View file

@ -55,6 +55,18 @@
"url": "https://github.com/nmattia/niv/archive/5830a4dd348d77e39a0f3c4c762ff2663b602d4c.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixos2111": {
"branch": "nixos-21.11",
"description": "Nix Packages collection",
"homepage": "",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "63198c9ccefdbd337cef0d85db0ea2689f4ce418",
"sha256": "05gc6xyv8a2dppngm1q44j85j769lr90lg20s6jv62gfg344i50r",
"type": "tarball",
"url": "https://github.com/nixos/nixpkgs/archive/63198c9ccefdbd337cef0d85db0ea2689f4ce418.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "nixos-22.05",
"builtin": false,

View file

@ -64,6 +64,8 @@
];
};
services.postgresqlBackup.databases = ["gitea"];
services.nginx = {
enable = true; # Enable Nginx
recommendedGzipSettings = true;

View file

@ -39,6 +39,8 @@
];
};
services.postgresqlBackup.databases = ["hydra"];
networking.firewall.allowedTCPPorts = [config.services.hydra.port];
#services.hydra-dev = {

View file

@ -145,6 +145,8 @@
};
};
services.postgresqlBackup.databases = ["matrix-synapse"];
security.acme = {
acceptTerms = true;
certs = {

View file

@ -45,6 +45,8 @@
];
};
services.postgresqlBackup.databases = ["nextcloud"];
services.nginx = {
enable = true; # Enable Nginx
recommendedGzipSettings = true;

View file

@ -4,7 +4,10 @@
pkgs,
lib,
...
}: {
}: let
sources = import ../nix/sources.nix;
nixpkgs2111 = (import sources.nixos2111 {}).pkgs;
in {
imports = [
../profiles/openssh.nix
../secrets/user-craige.nix
@ -16,6 +19,15 @@
withUtempter = true;
};
services.postgresql = {
package = nixpkgs2111.postgresql_9_6;
};
services.postgresqlBackup = {
enable = true;
compression = "zstd";
};
security.polkit.enable = false; # avoid CVE-2021-4034 (PwnKit)
services.udisks2.enable = false; # disable udisks2 which enables polkit
}

View file

@ -43,6 +43,8 @@
];
};
services.postgresqlBackup.databases = ["tt_rss"];
services.nginx = {
enable = true; # Enable Nginx
recommendedGzipSettings = true;