mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 12:49:32 -08:00
moved postgres to it's own file
This commit is contained in:
parent
958128e86e
commit
e18d2a06f7
3 changed files with 88 additions and 84 deletions
|
@ -16,6 +16,7 @@
|
|||
./modules/nginx.nix
|
||||
./modules/nextcloud.nix
|
||||
./modules/nicks_nextcould_integrations.nix
|
||||
./modules/postgres.nix
|
||||
./modules/protonvpn.nix
|
||||
./modules/tailscale.nix
|
||||
./modules/vaultwarden.nix
|
||||
|
|
|
@ -59,25 +59,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
enableTCPIP = true;
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "nextcloud";
|
||||
ensureDBOwnership = 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
|
||||
};
|
||||
|
||||
# Make sure PostSQL is running before nextcloud
|
||||
systemd.services."nextcloud-setup" = {
|
||||
requires = ["postgresql.service"];
|
||||
|
|
22
hosts/Alaska/modules/postgres.nix
Normal file
22
hosts/Alaska/modules/postgres.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
enableTCPIP = true;
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "nextcloud";
|
||||
ensureDBOwnership = 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
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue