improve pg
This commit is contained in:
parent
23c472e0fc
commit
82819b9a38
2 changed files with 8 additions and 3 deletions
|
|
@ -4,12 +4,17 @@
|
||||||
imports = [
|
imports = [
|
||||||
../common.nix
|
../common.nix
|
||||||
../../services/openssh.nix
|
../../services/openssh.nix
|
||||||
|
../../services/postgres.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "sql";
|
hostName = "sql";
|
||||||
firewall = {
|
firewall = {
|
||||||
# TODO: add postgres from internal network
|
enable = true;
|
||||||
|
extraInputRules = ''
|
||||||
|
ip saddr 195.160.173.0/24 ip daddr 195.160.173.15 tcp dport 5432 accept
|
||||||
|
ip6 saddr 2001:678:760:cccb::/64 ip6 daddr 2001:678:760:cccb::15 tcp dport 5432 accept
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
services = {
|
services = {
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.postgresql_16;
|
package = pkgs.postgresql_18;
|
||||||
enableJIT = true;
|
enableJIT = true;
|
||||||
initdbArgs = [
|
initdbArgs = [
|
||||||
"--locale=C"
|
"--locale=C"
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
};
|
};
|
||||||
postgresqlBackup = {
|
postgresqlBackup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
startAt = "*-*-* 09:00:00";
|
startAt = "@daily";
|
||||||
compression = "zstd";
|
compression = "zstd";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue