diff --git a/hosts/Alaska/default.nix b/hosts/Alaska/default.nix index b00e4d1..c42bf1c 100644 --- a/hosts/Alaska/default.nix +++ b/hosts/Alaska/default.nix @@ -7,7 +7,6 @@ (import ./hardware-configuration.nix) (import ./modules/nginx.nix) (import ./modules/nextcloud.nix) - (import ./modules/postgresql.nix) (import ./modules/msmtp.nix) (import ./modules/forgejo.nix) ]; @@ -34,7 +33,7 @@ }; firewall = { enable = true; - allowedTCPPorts = [80 443 3001]; # port 3001 opened to allow git traffic on the local netword + allowedTCPPorts = [80 443 3001 5432]; # port 3001 opened to allow git traffic on the local netword }; }; diff --git a/hosts/Alaska/modules/nextcloud.nix b/hosts/Alaska/modules/nextcloud.nix index ad92d0c..abe8db2 100644 --- a/hosts/Alaska/modules/nextcloud.nix +++ b/hosts/Alaska/modules/nextcloud.nix @@ -40,6 +40,7 @@ services.postgresql = { enable = true; + enableTCPIP = true; ensureDatabases = [ "nextcloud" ]; ensureUsers = [ { @@ -52,7 +53,8 @@ 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 }; # Make sure PostSQL is running before nextcloud diff --git a/hosts/Alaska/modules/postgresql.nix b/hosts/Alaska/modules/postgresql.nix deleted file mode 100644 index 5ff13d7..0000000 --- a/hosts/Alaska/modules/postgresql.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - - services.postgresql = { - enable = true; - ensureDatabases = [ "nextcloud" ]; - ensureUsers = [ - { - name = "nextcloud"; - ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; - } - ]; - 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 - ''; - }; - -}