3
3
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2025-07-16 03:44:15 +02:00
Files
common
home
hosts
burnham
challenger
defiant
services
matrix
monitoring
dyndns.nix
flame.nix
gitea.nix
hedgedoc.nix
home-assistant.nix
keycloak.nix
koillection.nix
microbin.nix
minecraft.nix
nginx.nix
pihole.nix
postgresql.nix
rtl-tcp.nix
searx.nix
vaultwarden.nix
wireguard.nix
backup.nix
configuration.nix
filesystems.nix
hardware-configuration.nix
home.nix
libvirt.nix
felixalbpc
malcolm
sisko
voyager
worf
secrets
shells
.gitignore
.sops.yaml
README.md
base.nix
flake.lock
flake.nix
shell.nix
nixos-config/hosts/defiant/services/postgresql.nix

26 lines
636 B
Nix

{ config, pkgs, lib, ... }:
{
services.postgresql = {
enable = true;
enableTCPIP = true;
authentication = ''
host all all 172.16.0.0/12 md5
'';
};
services.postgresqlBackup = {
enable = true;
location = "/tank/backup/postgresql";
startAt = "*-*-* 03:15:00";
# Each service is registered in its own configuration file
databases = [ ];
};
# Docker containers on this host can reach postgres
networking.firewall.extraCommands = "iptables -A INPUT -p tcp --destination-port 5432 -s 172.16.0.0/12 -j ACCEPT";
environment.systemPackages = [ config.services.postgresql.package ];
}