From ab4faa2f7e127cca18ebdb2ffcc89e1d25178cfa Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Fri, 12 Jul 2024 02:00:26 +0000 Subject: [PATCH] added postgres to wsl installation for dev server --- hosts/WSL/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hosts/WSL/default.nix b/hosts/WSL/default.nix index 22ac813..a0530c4 100644 --- a/hosts/WSL/default.nix +++ b/hosts/WSL/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: { # See https://nix-community.github.io/NixOS-WSL/how-to/change-username.html @@ -31,4 +31,16 @@ package = pkgs.nixVersions.stable; extraOptions = "experimental-features = nix-command flakes"; }; + + services.postgresql = { + enable = true; + enableTCPIP = true; + authentication = lib.mkForce '' + # TYPE DATABASE USER ADDRESS METHOD + local all all trust + host all all 127.0.0.1/32 trust + host all all ::1/128 trust + host all all 0.0.0.0/0 md5 + ''; # address is the computer you are connecting from + }; }