{ pkgs, ... }: { networking.useHostResolvConf = true; networking.hosts = { "192.168.100.1" = [ "matrix.rory.gay" "rory.gay" ]; }; networking.firewall = { enable = true; allowedTCPPorts = [ 3001 3002 3003 ]; }; # check that we can reach the database server before starting the service #systemd.services."spacebar-apply-migrations" = # let # address = "192.168.100.1"; # in # { # path = [ pkgs.netcat pkgs.bash ]; # serviceConfig = { # ExecStartPre = "${pkgs.bash}/bin/sh -c 'until ${pkgs.netcat}/bin/nc -z ${address} 5432; do echo \"Waiting for database server...\"; sleep 0.2; done'"; # }; # }; }