Compare commits

..

2 commits

7 changed files with 12 additions and 6 deletions

View file

@ -36,7 +36,7 @@ in {
''; '';
}; };
services.postgresqlBackup = mkIf my.services.postgresql-backup.enable { services.postgresqlBackup = {
databases = [ "bitwarden_rs" ]; databases = [ "bitwarden_rs" ];
}; };

View file

@ -14,6 +14,7 @@
./nextcloud.nix ./nextcloud.nix
./nginx.nix ./nginx.nix
./postgresql-backup.nix ./postgresql-backup.nix
./postgresql.nix
./tgv.nix ./tgv.nix
./transmission.nix ./transmission.nix
./wireguard.nix ./wireguard.nix

View file

@ -79,7 +79,7 @@ in {
]; ];
}; };
services.postgresqlBackup = mkIf my.services.postgresql-backup.enable { services.postgresqlBackup = {
databases = [ "gitea" ]; databases = [ "gitea" ];
}; };

View file

@ -33,10 +33,9 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
package = pkgs.postgresql_12;
}; };
services.postgresqlBackup = mkIf my.services.postgresql-backup.enable { services.postgresqlBackup = {
databases = [ "matrix-synapse" ]; databases = [ "matrix-synapse" ];
}; };

View file

@ -29,7 +29,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
# services.postgresql is automatically enabled by services.miniflux, let's # services.postgresql is automatically enabled by services.miniflux, let's
# back it up # back it up
services.postgresqlBackup = mkIf my.services.postgresql-backup.enable { services.postgresqlBackup = {
databases = [ "miniflux" ]; databases = [ "miniflux" ];
}; };

View file

@ -14,7 +14,6 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# FIXME: set postgresql package globally
services.postgresql = { services.postgresql = {
enable = true; enable = true;

7
services/postgresql.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
# set postgresql version so we don't get any bad surprise
config.services.postgresql = {
package = pkgs.postgresql_12;
};
}