mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 12:49:32 -08:00
Moved postgresql to seperate file
This commit is contained in:
parent
6ac280f0a2
commit
570ff894f8
2 changed files with 23 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
(import ./hardware-configuration.nix)
|
||||
(import ./modules/nginx.nix)
|
||||
(import ./modules/nextcloud.nix)
|
||||
(import ./modules/postgresql.nix)
|
||||
(import ./modules/msmtp.nix)
|
||||
(import ./modules/forgejo.nix)
|
||||
];
|
||||
|
|
22
hosts/Alaska/modules/postgresql.nix
Normal file
22
hosts/Alaska/modules/postgresql.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ 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
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue